Browse Source

qpeg: return a meaningful error code.

tags/n1.2
Anton Khirnov 12 years ago
parent
commit
62d9655217
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      libavcodec/qpeg.c

+ 3
- 3
libavcodec/qpeg.c View File

@@ -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);


Loading…
Cancel
Save