Commit 6746cd7f authored by Janne Grunau's avatar 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.
parent a34a609f
......@@ -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 ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment