changeset 5524:f47bc5359101 libavcodec

fix decoding of samples.mplayerhq.hu/game-formats/idroq/demoEnd.roq closes issue78
author michael
date Sat, 11 Aug 2007 23:09:28 +0000
parents c2ab2ac31edb
children bc4791868c52
files roqvideodec.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/roqvideodec.c	Sat Aug 11 22:48:55 2007 +0000
+++ b/roqvideodec.c	Sat Aug 11 23:09:28 2007 +0000
@@ -174,12 +174,17 @@
                             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);