diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-08-17 16:43:50 +0200 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-08-18 09:52:15 +0200 |
commit | 9467f4eb5d90bdcffc3dd7c0751443eb1b1b4eb4 (patch) | |
tree | 009563477a2e3b6ee57a9402ecd9b6f0ac66caac /libavcodec | |
parent | 7e49474aa02e93ba2d80b330cba1ec38f4c4f3ee (diff) | |
download | ffmpeg-9467f4eb5d90bdcffc3dd7c0751443eb1b1b4eb4.tar.gz |
lavc/tscc: use reget_buffer.
The previous code would release the buffer and get it
immediately after, assuming the contents is the same.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/tscc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c index 5573d28edd..954e372c15 100644 --- a/libavcodec/tscc.c +++ b/libavcodec/tscc.c @@ -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; } |