mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-10-01 00:54:33 +02:00
Merge commit '9cbae3a7d57bd2b862c37fd8123bd1fba680e801'
* commit '9cbae3a7d57bd2b862c37fd8123bd1fba680e801': roqvideodec: use av_frame_copy Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
This commit is contained in:
commit
5fe1578571
@ -204,14 +204,15 @@ static int roq_decode_frame(AVCodecContext *avctx,
|
|||||||
const uint8_t *buf = avpkt->data;
|
const uint8_t *buf = avpkt->data;
|
||||||
int buf_size = avpkt->size;
|
int buf_size = avpkt->size;
|
||||||
RoqContext *s = avctx->priv_data;
|
RoqContext *s = avctx->priv_data;
|
||||||
int copy= !s->current_frame->data[0] && s->last_frame->data[0];
|
int copy = !s->current_frame->data[0] && s->last_frame->data[0];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if ((ret = ff_reget_buffer(avctx, s->current_frame)) < 0)
|
if ((ret = ff_reget_buffer(avctx, s->current_frame)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if(copy) {
|
if (copy) {
|
||||||
if ((ret = av_frame_copy(s->current_frame, s->last_frame)) < 0)
|
ret = av_frame_copy(s->current_frame, s->last_frame);
|
||||||
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user