Commit 3d179edf authored by Paul B Mahol's avatar Paul B Mahol

yop: check return value of avformat_new_stream()

Fixes null pointer dereference, fixes CID703729.
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent a9bd51b1
......@@ -64,6 +64,8 @@ static int yop_read_header(AVFormatContext *s)
audio_stream = avformat_new_stream(s, NULL);
video_stream = avformat_new_stream(s, NULL);
if (!audio_stream || !video_stream)
return AVERROR(ENOMEM);
// Extra data that will be passed to the decoder
video_stream->codec->extradata_size = 8;
......
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