Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-10-22 21:18:00 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2015-10-22 21:23:44 +0300
commitef4fbee79df6b3835bef36bbe59bdc7c834676f2 (patch)
tree35c9eef596d832fc5eb701cf9cf3181c4c89882f /libavcodec
parent42b87ed01eb32b3b449e35b2926492c48220e321 (diff)
roqvideodec: use av_frame_copy
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/roqvideodec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c
index 362e88292c..c1ff3f109f 100644
--- a/libavcodec/roqvideodec.c
+++ b/libavcodec/roqvideodec.c
@@ -204,16 +204,16 @@ static int roq_decode_frame(AVCodecContext *avctx,
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
RoqContext *s = avctx->priv_data;
- int copy= !s->current_frame->data[0];
+ int copy= !s->current_frame->data[0] && s->last_frame->data[0];
int ret;
if ((ret = ff_reget_buffer(avctx, s->current_frame)) < 0)
return ret;
- if(copy)
- av_image_copy(s->current_frame->data, s->current_frame->linesize,
- s->last_frame->data, s->last_frame->linesize,
- avctx->pix_fmt, avctx->width, avctx->height);
+ if(copy) {
+ if ((ret = av_frame_copy(s->current_frame, s->last_frame)) < 0)
+ return ret;
+ }
bytestream2_init(&s->gb, buf, buf_size);
roqvideo_decode_frame(s);