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 298374 93eddf049b08edcb3bf5a1d616fd49f09ec1dfa8
parent 298373 dc997e552ee61b7b888e4604292046282ce53836
child 298375 0056c6a320b70420a0620e86bb182f9c5dc1ee52
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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);