1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

lavc/tscc: use reget_buffer.

The previous code would release the buffer and get it
immediately after, assuming the contents is the same.
This commit is contained in:
Nicolas George 2012-08-17 16:43:50 +02:00
parent 7e49474aa0
commit 9467f4eb5d

View File

@ -79,12 +79,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
int zret; // Zlib return code
int ret, len = buf_size;
if(c->pic.data[0])
avctx->release_buffer(avctx, &c->pic);
c->pic.reference = 3;
c->pic.buffer_hints = FF_BUFFER_HINTS_VALID;
if((ret = avctx->get_buffer(avctx, &c->pic)) < 0){
if((ret = avctx->reget_buffer(avctx, &c->pic)) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}