[FFmpeg-devel] [PATCH] oggparsevp8: set need_context_update when changing codec id

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Tue Nov 15 23:51:35 EET 2016


Otherwise the codec context and codecpar might disagree on the codec id,
triggering asserts in av_parser_parse2.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
---
 libavformat/oggparsevp8.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/oggparsevp8.c b/libavformat/oggparsevp8.c
index c534ab1..86495ae 100644
--- a/libavformat/oggparsevp8.c
+++ b/libavformat/oggparsevp8.c
@@ -62,6 +62,7 @@ static int vp8_header(AVFormatContext *s, int idx)
         st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
         st->codecpar->codec_id   = AV_CODEC_ID_VP8;
         st->need_parsing      = AVSTREAM_PARSE_HEADERS;
+        st->internal->need_context_update = 1;
         break;
     case 0x02:
         if (p[6] != 0x20)
-- 
2.10.2


More information about the ffmpeg-devel mailing list