diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-08-11 23:09:28 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-08-11 23:09:28 +0000 |
commit | b0f3382873d275c4bd2e04f6f4f74f75162e5325 (patch) | |
tree | c54670c77f4955cf307fe1853aa734008758c7b9 /libavcodec/roqvideodec.c | |
parent | aee481cebe8f95ce3789bdead6fb8ddfb142c37f (diff) | |
download | ffmpeg-b0f3382873d275c4bd2e04f6f4f74f75162e5325.tar.gz |
fix decoding of samples.mplayerhq.hu/game-formats/idroq/demoEnd.roq
closes issue78
Originally committed as revision 10079 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/roqvideodec.c')
-rw-r--r-- | libavcodec/roqvideodec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c index d75131b142..2d811c5b25 100644 --- a/libavcodec/roqvideodec.c +++ b/libavcodec/roqvideodec.c @@ -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); |