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 296669 93eddf049b08
parent 296668 dc997e552ee6
child 296670 0056c6a320b7
push id5279
push userjyavenard@mozilla.com
push date2015-11-09 13:25 +0000
treeherdermozilla-beta@0056c6a320b7 [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);