Commit d7d5b5df authored by Paul B Mahol's avatar Paul B Mahol

flvdec: check return value of create_stream()

Fixes null pointer dereference. Fixes CID732242.
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 295218f5
......@@ -730,6 +730,8 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
av_log(s, AV_LOG_WARNING, "Stream discovered after head already parsed\n");
st = create_stream(s,
(int[]){AVMEDIA_TYPE_VIDEO, AVMEDIA_TYPE_AUDIO, AVMEDIA_TYPE_DATA}[stream_type]);
if (!st)
return AVERROR(ENOMEM);
}
av_dlog(s, "%d %X %d \n", stream_type, flags, st->discard);
......
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