Mercurial > libavcodec.hg
changeset 5382:7f96f6e16f81 libavcodec
Return AVERROR(ENOMEM) on memory allocation failure of avcodec_open.
author | takis |
---|---|
date | Fri, 20 Jul 2007 15:08:10 +0000 |
parents | 4cac2cfe2745 |
children | 8a28860d54ba |
files | utils.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Thu Jul 19 15:56:56 2007 +0000 +++ b/utils.c Fri Jul 20 15:08:10 2007 +0000 @@ -832,8 +832,10 @@ 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; }