[FFmpeg-cvslog] r10079 - trunk/libavcodec/roqvideodec.c

michael subversion
Sun Aug 12 01:09:28 CEST 2007


Author: michael
Date: Sun Aug 12 01:09:28 2007
New Revision: 10079

Log:
fix decoding of samples.mplayerhq.hu/game-formats/idroq/demoEnd.roq
closes issue78


Modified:
   trunk/libavcodec/roqvideodec.c

Modified: trunk/libavcodec/roqvideodec.c
==============================================================================
--- trunk/libavcodec/roqvideodec.c	(original)
+++ trunk/libavcodec/roqvideodec.c	Sun Aug 12 01:09:28 2007
@@ -174,12 +174,17 @@ static int roq_decode_frame(AVCodecConte
                             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);




More information about the ffmpeg-cvslog mailing list