diff options
author | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2007-07-20 15:08:10 +0000 |
---|---|---|
committer | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2007-07-20 15:08:10 +0000 |
commit | 90f06ceaa0dcc9a40029d6e7438fb2291e4d351c (patch) | |
tree | 799a32dbc053b60ad27a4314739a3492d6076244 /libavcodec/utils.c | |
parent | 9510da2bcaf03a6f0019850772df9332d614cd28 (diff) | |
download | ffmpeg-90f06ceaa0dcc9a40029d6e7438fb2291e4d351c.tar.gz |
Return AVERROR(ENOMEM) on memory allocation failure of avcodec_open.
Originally committed as revision 9769 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index f5f9f2f0d1..cd7bc1c09a 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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; } |