[FFmpeg-cvslog] lavf probe: prevent codec probe with no data at all seen
Janne Grunau
git at videolan.org
Fri Sep 21 14:48:52 CEST 2012
ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Fri Sep 7 16:27:21 2012 +0200| [6746cd7f61964f94f949606f839598861472dcff] | committer: Janne Grunau
lavf probe: prevent codec probe with no data at all seen
This occurs with fuzzed mpeg-ts files. set_codec_from_probe_data() is
called with a zeroed AVProbeData since no packet made through for
specific stream.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6746cd7f61964f94f949606f839598861472dcff
---
libavformat/utils.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index e4e4a8b..64be7c8 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -625,6 +625,11 @@ static void probe_codec(AVFormatContext *s, AVStream *st, const AVPacket *pkt)
memset(pd->buf+pd->buf_size, 0, AVPROBE_PADDING_SIZE);
} else {
st->probe_packets = 0;
+ if (!pd->buf_size) {
+ av_log(s, AV_LOG_ERROR, "nothing to probe for stream %d\n",
+ st->index);
+ return;
+ }
}
if (!st->probe_packets ||
More information about the ffmpeg-cvslog
mailing list