diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-11-17 18:17:54 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-01-14 11:35:54 +0100 |
commit | 62d9655217f94ba5a1fa05ada1724e4f61df8605 (patch) | |
tree | a88a037921ac1d79480efd2776bae3f74d6720f1 /libavcodec | |
parent | 3344f5cb747bb1f54cc34878b66dc0536f194720 (diff) | |
download | ffmpeg-62d9655217f94ba5a1fa05ada1724e4f61df8605.tar.gz |
qpeg: return a meaningful error code.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/qpeg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c index 4a918e71ec..c295543c38 100644 --- a/libavcodec/qpeg.c +++ b/libavcodec/qpeg.c @@ -247,7 +247,7 @@ static int decode_frame(AVCodecContext *avctx, QpegContext * const a = avctx->priv_data; AVFrame * const p = &a->pic; uint8_t* outdata; - int delta; + int delta, ret; const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL); if (avpkt->size < 0x86) { @@ -257,9 +257,9 @@ static int decode_frame(AVCodecContext *avctx, bytestream2_init(&a->buffer, avpkt->data, avpkt->size); p->reference = 3; - if (avctx->reget_buffer(avctx, p) < 0) { + if ((ret = avctx->reget_buffer(avctx, p)) < 0) { av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); - return -1; + return ret; } outdata = a->pic.data[0]; bytestream2_skip(&a->buffer, 4); |