Commit 90f06cea authored by Panagiotis Issaris's avatar Panagiotis Issaris

Return AVERROR(ENOMEM) on memory allocation failure of avcodec_open.

Originally committed as revision 9769 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 9510da2b
......@@ -832,8 +832,10 @@ int avcodec_open(AVCodecContext *avctx, AVCodec *codec)
if (codec->priv_data_size > 0) {
avctx->priv_data = av_mallocz(codec->priv_data_size);
if (!avctx->priv_data)
if (!avctx->priv_data) {
ret = AVERROR(ENOMEM);
goto end;
}
} else {
avctx->priv_data = NULL;
}
......
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