Mercurial > libavcodec.hg
changeset 11480:534872e7ab38 libavcodec
Make iff.c:decode_init return the value returned by
avctx->get_buffer() in case of error, rather than AVERROR_UNKNOWN
which is deprecated, and mark AVERROR_UNKNOWN for deletion at the next
major bump.
author | stefano |
---|---|
date | Sat, 13 Mar 2010 19:19:40 +0000 |
parents | 59c11c1f3991 |
children | 96dde15b2e0d |
files | iff.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/iff.c Sat Mar 13 18:19:36 2010 +0000 +++ b/iff.c Sat Mar 13 19:19:40 2010 +0000 @@ -61,6 +61,7 @@ static av_cold int decode_init(AVCodecContext *avctx) { IffContext *s = avctx->priv_data; + int err; if (avctx->bits_per_coded_sample <= 8) { avctx->pix_fmt = PIX_FMT_PAL8; @@ -76,9 +77,9 @@ return AVERROR(ENOMEM); s->frame.reference = 1; - if (avctx->get_buffer(avctx, &s->frame) < 0) { + if ((err = avctx->get_buffer(avctx, &s->frame) < 0)) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); - return AVERROR_UNKNOWN; + return err; } return avctx->bits_per_coded_sample <= 8 ?