Skip to content
Snippets Groups Projects
Commit d9010daa authored by Reimar Döffinger's avatar Reimar Döffinger
Browse files

Set AVFrame reference before reget_buffer.


Otherwise it might return a write-only frame which would break
decoding completely.

Signed-off-by: default avatarReimar Döffinger <Reimar.Doeffinger@gmx.de>
parent 266f6eef
No related branches found
No related tags found
No related merge requests found
...@@ -189,6 +189,7 @@ static int roq_decode_frame(AVCodecContext *avctx, ...@@ -189,6 +189,7 @@ static int roq_decode_frame(AVCodecContext *avctx,
RoqContext *s = avctx->priv_data; RoqContext *s = avctx->priv_data;
int copy= !s->current_frame->data[0]; int copy= !s->current_frame->data[0];
s->current_frame->reference = 3;
if (avctx->reget_buffer(avctx, s->current_frame)) { if (avctx->reget_buffer(avctx, s->current_frame)) {
av_log(avctx, AV_LOG_ERROR, " RoQ: get_buffer() failed\n"); av_log(avctx, AV_LOG_ERROR, " RoQ: get_buffer() failed\n");
return -1; return -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment