]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
fix decoding of samples.mplayerhq.hu/game-formats/idroq/demoEnd.roq
authormichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 11 Aug 2007 23:09:28 +0000 (23:09 +0000)
committermichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 11 Aug 2007 23:09:28 +0000 (23:09 +0000)
closes issue78

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10079 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/roqvideodec.c

index d75131b14231b0bc129d0901d7c268536bc7904f..2d811c5b25ccd29b89985c779a66dec9e9173d3f 100644 (file)
@@ -174,12 +174,17 @@ static int roq_decode_frame(AVCodecContext *avctx,
                             uint8_t *buf, int buf_size)
 {
     RoqContext *s = avctx->priv_data;
+    int copy= !s->current_frame->data[0];
 
     if (avctx->reget_buffer(avctx, s->current_frame)) {
         av_log(avctx, AV_LOG_ERROR, "  RoQ: get_buffer() failed\n");
         return -1;
     }
 
+    if(copy)
+        av_picture_copy((AVPicture*)s->current_frame, (AVPicture*)s->last_frame,
+                        avctx->pix_fmt, avctx->width, avctx->height);
+
     s->buf = buf;
     s->size = buf_size;
     roqvideo_decode_frame(s);