lavc/roqvideodec: propagate reget_buffer() error code
authorStefano Sabatini <stefasab@gmail.com>
Sun, 9 Sep 2012 09:11:43 +0000 (11:11 +0200)
committerStefano Sabatini <stefasab@gmail.com>
Mon, 24 Sep 2012 10:02:31 +0000 (12:02 +0200)
libavcodec/roqvideodec.c

index 1e2915e..cd4eb2a 100644 (file)
@@ -188,11 +188,12 @@ static int roq_decode_frame(AVCodecContext *avctx,
     int buf_size = avpkt->size;
     RoqContext *s = avctx->priv_data;
     int copy= !s->current_frame->data[0];
+    int ret;
 
     s->current_frame->reference = 3;
-    if (avctx->reget_buffer(avctx, s->current_frame)) {
+    if ((ret = avctx->reget_buffer(avctx, s->current_frame)) < 0) {
         av_log(avctx, AV_LOG_ERROR, "  RoQ: get_buffer() failed\n");
-        return -1;
+        return ret;
     }
 
     if(copy)