summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2015-03-09 21:57:59 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-09 21:58:01 +0000
commit64c4e0264a5fb1bf4700b85668d0fb50146f28e9 (patch)
tree1b1757786b55db072e963aed7f84445a93e28e3c /media
parent434a6094f69542257864b4f4223ce915c77976b1 (diff)
parent5bb7e181d9156135e56ce44a3d0bd42eb31a9ee8 (diff)
downloadframeworks_av-64c4e0264a5fb1bf4700b85668d0fb50146f28e9.zip
frameworks_av-64c4e0264a5fb1bf4700b85668d0fb50146f28e9.tar.gz
frameworks_av-64c4e0264a5fb1bf4700b85668d0fb50146f28e9.tar.bz2
Merge "AnotherPacketSource: return format of first non-discontinuity packet"
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/mpeg2ts/AnotherPacketSource.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
index f266fe7..bb05417 100644
--- a/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
+++ b/media/libstagefright/mpeg2ts/AnotherPacketSource.cpp
@@ -91,13 +91,11 @@ sp<MetaData> AnotherPacketSource::getFormat() {
while (it != mBuffers.end()) {
sp<ABuffer> buffer = *it;
int32_t discontinuity;
- if (buffer->meta()->findInt32("discontinuity", &discontinuity)) {
- break;
- }
-
- sp<RefBase> object;
- if (buffer->meta()->findObject("format", &object)) {
- return mFormat = static_cast<MetaData*>(object.get());
+ if (!buffer->meta()->findInt32("discontinuity", &discontinuity)) {
+ sp<RefBase> object;
+ if (buffer->meta()->findObject("format", &object)) {
+ return mFormat = static_cast<MetaData*>(object.get());
+ }
}
++it;