Commit e78c9e84 authored by takis's avatar takis

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@9769 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 82ee2c4b
...@@ -832,8 +832,10 @@ int avcodec_open(AVCodecContext *avctx, AVCodec *codec) ...@@ -832,8 +832,10 @@ int avcodec_open(AVCodecContext *avctx, AVCodec *codec)
if (codec->priv_data_size > 0) { if (codec->priv_data_size > 0) {
avctx->priv_data = av_mallocz(codec->priv_data_size); avctx->priv_data = av_mallocz(codec->priv_data_size);
if (!avctx->priv_data) if (!avctx->priv_data) {
ret = AVERROR(ENOMEM);
goto end; goto end;
}
} else { } else {
avctx->priv_data = NULL; 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