Bug 1347439 - part 7: make sure TrackInfo in the sample is up to date. r?jya
Cherry-picked from
bug 1344649 part 5 for
bug 1336431
MozReview-Commit-ID: GxgYsaSqKSR
--- a/dom/media/platforms/wrappers/H264Converter.cpp
+++ b/dom/media/platforms/wrappers/H264Converter.cpp
@@ -288,16 +288,19 @@ H264Converter::CheckForSPSChange(MediaRa
mCurrentConfig.mExtraData)) {
return NS_OK;
}
if (MediaPrefs::MediaDecoderCheckRecycling() &&
mDecoder->SupportDecoderRecycling()) {
// Do not recreate the decoder, reuse it.
UpdateConfigFromExtraData(extra_data);
+ if (!aSample->mTrackInfo) {
+ aSample->mTrackInfo = new SharedTrackInfo(mCurrentConfig, 0);
+ }
mNeedKeyframe = true;
return NS_OK;
}
// The SPS has changed, signal to flush the current decoder and create a
// new one.
mDecoder->Flush();
Shutdown();
return CreateDecoderAndInit(aSample);