Hi,

The attached patch fixes playback of MP4/VP9 media containing superframes
when using the built-in VP9 decoder.

As an example,
https://github.com/Netflix/vp9-dash/raw/master/DASH-Samples/Fountain_2997_0560kbps_640x480_4x3PAR.ivf_DashUnencrypted.ismv
plays with corrupted frames using ffplay without this patch and works fine
with the patch applied (or with libvpx built with --enable-vp9-highbitdepth
forced via -vcodec libvpx).

Cheers,
>From 561c7e9ad45384437124d2d7293c15bfa3712ebb Mon Sep 17 00:00:00 2001
From: Matthew Gregan <kine...@flim.org>
Date: Wed, 7 Sep 2016 13:58:30 +1200
Subject: avformat/mov: Enable header parsing for VP9.

MP4 media containing VP9 using superframes (such as
https://github.com/Netflix/vp9-dash/raw/master/DASH-Samples/Fountain_2997_0560kbps_640x480_4x3PAR.ivf_DashUnencrypted.ismv)
does not decode correctly with the built-in VP9 decoder because
superframes are passed to the decoder whole rather than split into
individual frames.

Signed-off-by: Matthew Gregan <kine...@flim.org>

diff --git a/libavformat/mov.c b/libavformat/mov.c
index f499906..faa682a 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2163,6 +2163,9 @@ static int mov_finalize_stsd_codec(MOVContext *c, AVIOContext *pb,
     case AV_CODEC_ID_VC1:
         st->need_parsing = AVSTREAM_PARSE_FULL;
         break;
+    case AV_CODEC_ID_VP9:
+        st->need_parsing = AVSTREAM_PARSE_HEADERS;
+        break;
     default:
         break;
     }
-- 
2.9.3

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to