stagefright: propagate consumer usage flags in MediaSync

Bug: 19666434
Change-Id: I20533904d1591f2abeb1db5497fc5c143ed5b2e2
diff --git a/media/libstagefright/MediaSync.cpp b/media/libstagefright/MediaSync.cpp
index 85027ce..ad4b7a3 100644
--- a/media/libstagefright/MediaSync.cpp
+++ b/media/libstagefright/MediaSync.cpp
@@ -180,6 +180,10 @@
         bufferConsumer->consumerConnect(listener, false /* controlledByApp */);
     if (status == NO_ERROR) {
         bufferConsumer->setConsumerName(String8("MediaSync"));
+        // propagate usage bits from output surface
+        int usage = 0;
+        mOutput->query(NATIVE_WINDOW_CONSUMER_USAGE_BITS, &usage);
+        bufferConsumer->setConsumerUsageBits(usage);
         *outBufferProducer = bufferProducer;
         mInput = bufferConsumer;
     }