Browse Source

roqvideodec: use av_frame_copy

tags/n3.0
Hendrik Leppkes 10 years ago
parent
commit
ef4fbee79d
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      libavcodec/roqvideodec.c

+ 5
- 5
libavcodec/roqvideodec.c View File

@@ -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);


Loading…
Cancel
Save