Commit ab3fdaa7 authored by Anton Khirnov's avatar Anton Khirnov
Browse files

yop: only set extradata size after it has been successfully allocated

Do not leave a non-zero extradata_size set on failure
parent b513bf6f
......@@ -62,13 +62,12 @@ static int yop_read_header(AVFormatContext *s)
video_stream = avformat_new_stream(s, NULL);
// Extra data that will be passed to the decoder
video_stream->codec->extradata_size = 8;
video_stream->codec->extradata = av_mallocz(video_stream->codec->extradata_size +
video_stream->codec->extradata = av_mallocz(8 + FF_INPUT_BUFFER_PADDING_SIZE);
if (!video_stream->codec->extradata)
video_stream->codec->extradata_size = 8;
// Audio
audio_dec = audio_stream->codec;
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