summaryrefslogtreecommitdiff
path: root/libavcodec/iff.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-03-13 19:19:40 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-03-13 19:19:40 +0000
commit0edfa79b23163be51d3ee1678f5ff87b5207f636 (patch)
treed3efaa930cf0f87be1e67ce2f8caac141089ad48 /libavcodec/iff.c
parent382b5b3a0ca57c28191f8d44cb3411bb4ac4ce5e (diff)
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. Originally committed as revision 22512 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/iff.c')
-rw-r--r--libavcodec/iff.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index 490d347ec0..19671d767f 100644
--- a/libavcodec/iff.c
+++ b/libavcodec/iff.c
@@ -61,6 +61,7 @@ int ff_cmap_read_palette(AVCodecContext *avctx, uint32_t *pal)
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 @@ static av_cold int decode_init(AVCodecContext *avctx)
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 ?