Browse Source

avformat/oggdec: Disable mid stream codec changes

Fixes: 22082/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5688619118624768
Fixes: crash from V-codecs/Theora/theora_testsuite_broken/multi2.ogg

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Suggested-by: Lynne on IRC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 70277f1232)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.3
Michael Niedermayer 5 years ago
parent
commit
6011484167
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavformat/oggdec.c

+ 3
- 2
libavformat/oggdec.c View File

@@ -226,9 +226,10 @@ static int ogg_replace_stream(AVFormatContext *s, uint32_t serial, char *magic,
return AVERROR_INVALIDDATA;
}

/* We only have a single stream anyway, so if there's a new stream with
* a different codec just replace it */
os = &ogg->streams[0];
if (os->codec != codec)
return AVERROR(EINVAL);

os->serial = serial;
os->codec = codec;
os->serial = serial;


Loading…
Cancel
Save