Message ID | cfa22bc7-aa76-c0a9-6645-f026cc18c3f9@googlemail.com |
---|---|
State | New |
Headers | show |
On 04.11.2016 22:27, Andreas Cadhalpun wrote: > 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@googlemail.com> > --- > libavformat/oggparsetheora.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c > index b14f9f0..078d827 100644 > --- a/libavformat/oggparsetheora.c > +++ b/libavformat/oggparsetheora.c > @@ -111,6 +111,8 @@ static int theora_header(AVFormatContext *s, int idx) > thp->gpmask = (1U << thp->gpshift) - 1; > > st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; > + if (st->codecpar->codec_id != AV_CODEC_ID_THEORA) > + st->internal->need_context_update = 1; > st->codecpar->codec_id = AV_CODEC_ID_THEORA; > st->need_parsing = AVSTREAM_PARSE_HEADERS; > } > Ping. I intend to apply this in a few days. Best regards, Andreas
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c index b14f9f0..078d827 100644 --- a/libavformat/oggparsetheora.c +++ b/libavformat/oggparsetheora.c @@ -111,6 +111,8 @@ static int theora_header(AVFormatContext *s, int idx) thp->gpmask = (1U << thp->gpshift) - 1; st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; + if (st->codecpar->codec_id != AV_CODEC_ID_THEORA) + st->internal->need_context_update = 1; st->codecpar->codec_id = AV_CODEC_ID_THEORA; st->need_parsing = AVSTREAM_PARSE_HEADERS; }
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@googlemail.com> --- libavformat/oggparsetheora.c | 2 ++ 1 file changed, 2 insertions(+)