Commit b05b48df authored by kostya's avatar kostya

Get new buffer during frame decoding in VB video decoder, not only once

during decoder initialization.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19121 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2af55a8b
......@@ -185,6 +185,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
int rest = buf_size;
int offset = 0;
if(c->pic.data[0])
avctx->release_buffer(avctx, &c->pic);
c->pic.reference = 1;
if(avctx->get_buffer(avctx, &c->pic) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
c->stream = buf;
flags = bytestream_get_le16(&c->stream);
rest -= 2;
......@@ -247,12 +255,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
return -1;
}
c->pic.reference = 1;
if(avctx->get_buffer(avctx, &c->pic) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
c->frame = av_malloc( avctx->width * avctx->height);
c->prev_frame = av_malloc( avctx->width * avctx->height);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment