roqvideodec: set AVFrame reference before reget_buffer.

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
Reimar Döffinger 2011-11-05 23:27:00 +01:00 committed by Anton Khirnov
parent 1e92d58e44
commit 7679bd6e60
1 changed files with 1 additions and 0 deletions

View File

@ -175,6 +175,7 @@ static int roq_decode_frame(AVCodecContext *avctx,
RoqContext *s = avctx->priv_data;
int copy= !s->current_frame->data[0];
s->current_frame->reference = 3;
if (avctx->reget_buffer(avctx, s->current_frame)) {
av_log(avctx, AV_LOG_ERROR, " RoQ: get_buffer() failed\n");
return -1;