From 1bbb2a972c5dc705b800c3eaf0d493be3f0e5ea8 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Wed, 29 Jul 2015 23:43:49 +1000 Subject: [PATCH] Bug 1183196: [MSE] P2. Do not ignore tracks other than the first one. r=kentuckyfriedtakahe When used in the MP4ContainerParser, the MoofParser set the trackID as 0 ; indicating that all tracks are to be parsed. However it set later the trackID to the first one found, causing to ignore all following tracks. --- media/libstagefright/binding/MoofParser.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/media/libstagefright/binding/MoofParser.cpp b/media/libstagefright/binding/MoofParser.cpp index b1279636c40..7bb7d090de0 100644 --- a/media/libstagefright/binding/MoofParser.cpp +++ b/media/libstagefright/binding/MoofParser.cpp @@ -250,7 +250,11 @@ MoofParser::ParseMvex(Box& aBox) if (box.IsType("trex")) { Trex trex = Trex(box); if (!mTrex.mTrackId || trex.mTrackId == mTrex.mTrackId) { + auto trackId = mTrex.mTrackId; mTrex = trex; + // Keep the original trackId, as should it be 0 we want to continue + // parsing all tracks. + mTrex.mTrackId = trackId; } } }