diff options
author | James Almer <jamrial@gmail.com> | 2019-08-30 17:37:25 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-09-04 16:07:12 +0300 |
commit | 9ea6d2149e25d68885a24894bb911077b05388c4 (patch) | |
tree | d302ed27dd814bea2189537f62c4120f69ecb669 /libavcodec/qtrle.c | |
parent | 39f129593756e3e270ed3881ca076627f30e1eb7 (diff) |
avcodec/decode: add a flags parameter to ff_reget_buffer()
Some decoders may not need a writable buffer in some specific cases, but only
a reference to the existing buffer with updated frame properties instead, for
the purpose of returning duplicate frames. For this, the
FF_REGET_BUFFER_FLAG_READONLY flag is added, which will prevent potential
allocations and buffer copies when they are not needed.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/qtrle.c')
-rw-r--r-- | libavcodec/qtrle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index f565e0e358..52394f5264 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -490,7 +490,7 @@ static int qtrle_decode_frame(AVCodecContext *avctx, start_line = 0; height = s->avctx->height; } - if ((ret = ff_reget_buffer(avctx, s->frame)) < 0) + if ((ret = ff_reget_buffer(avctx, s->frame, 0)) < 0) return ret; row_ptr = s->frame->linesize[0] * start_line; |