1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

flvdec: check return value of create_stream()

Fixes null pointer dereference. Fixes CID732242.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2012-10-15 15:59:53 +00:00
parent 295218f531
commit d7d5b5dfc1

View File

@ -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);