Bug 1219134: P3. Properly set the keyframe flag. r=edwin a=sylvestre
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 30 Oct 2015 14:14:23 +1100
changeset 307713 93eddf049b08edcb3bf5a1d616fd49f09ec1dfa8
parent 307712 dc997e552ee61b7b888e4604292046282ce53836
child 307714 0056c6a320b70420a0620e86bb182f9c5dc1ee52
push id7348
push userjbruaroey@mozilla.com
push dateMon, 09 Nov 2015 21:46:36 +0000
reviewersedwin, sylvestre
bugs1219134
milestone43.0
Bug 1219134: P3. Properly set the keyframe flag. r=edwin a=sylvestre We were incorrectly setting the keyframe flag of the last input sample rather than of the decoded one.
dom/media/platforms/ffmpeg/FFmpegH264Decoder.cpp
--- a/dom/media/platforms/ffmpeg/FFmpegH264Decoder.cpp
+++ b/dom/media/platforms/ffmpeg/FFmpegH264Decoder.cpp
@@ -209,17 +209,17 @@ FFmpegH264Decoder<LIBAV_VER>::DoDecodeFr
     b.mPlanes[2].mOffset = b.mPlanes[2].mSkip = 0;
 
     nsRefPtr<VideoData> v = VideoData::Create(info,
                                               mImageContainer,
                                               aSample->mOffset,
                                               pts,
                                               aSample->mDuration,
                                               b,
-                                              aSample->mKeyframe,
+                                              !!mFrame->key_frame,
                                               -1,
                                               gfx::IntRect(0, 0, mCodecContext->width, mCodecContext->height));
     if (!v) {
       NS_WARNING("image allocation error.");
       mCallback->Error();
       return DecodeResult::DECODE_ERROR;
     }
     mCallback->Output(v);