Mercurial > libavcodec.hg
comparison utils.c @ 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 | ed7d84e0164d |
children | 8a28860d54ba |
comparison
equal
deleted
inserted
replaced
5381:4cac2cfe2745 | 5382:7f96f6e16f81 |
---|---|
830 if(avctx->codec) | 830 if(avctx->codec) |
831 goto end; | 831 goto end; |
832 | 832 |
833 if (codec->priv_data_size > 0) { | 833 if (codec->priv_data_size > 0) { |
834 avctx->priv_data = av_mallocz(codec->priv_data_size); | 834 avctx->priv_data = av_mallocz(codec->priv_data_size); |
835 if (!avctx->priv_data) | 835 if (!avctx->priv_data) { |
836 ret = AVERROR(ENOMEM); | |
836 goto end; | 837 goto end; |
838 } | |
837 } else { | 839 } else { |
838 avctx->priv_data = NULL; | 840 avctx->priv_data = NULL; |
839 } | 841 } |
840 | 842 |
841 if(avctx->coded_width && avctx->coded_height) | 843 if(avctx->coded_width && avctx->coded_height) |