diff options
author | wm4 <nfxjfg@googlemail.com> | 2018-03-01 15:50:56 +0100 |
---|---|---|
committer | wm4 <nfxjfg@googlemail.com> | 2018-03-18 12:36:24 +0100 |
commit | 36855abc0eb96d5caa992304f3417a0f8a62960c (patch) | |
tree | cf8662ac6546176d37267ecc120c2e9812401f94 /libavutil/frame.c | |
parent | f19b0c6aeea212a3c2e05d4cebb856d1d774def7 (diff) | |
download | ffmpeg-36855abc0eb96d5caa992304f3417a0f8a62960c.tar.gz |
lavu/frame: fix inconsistent qp_table_buf deprecation
Everything related to the QP data is deprecated, with qp_table_buf being
an inconsistent exception. Some parts were under the deprecation guards,
some not. It probably didn't even compile.
Diffstat (limited to 'libavutil/frame.c')
-rw-r--r-- | libavutil/frame.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavutil/frame.c b/libavutil/frame.c index 61c45f0f53..0db2a2d57b 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -48,11 +48,10 @@ MAKE_ACCESSORS(AVFrame, frame, enum AVColorRange, color_range) #if FF_API_FRAME_QP int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int qp_type) { +FF_DISABLE_DEPRECATION_WARNINGS av_buffer_unref(&f->qp_table_buf); f->qp_table_buf = buf; - -FF_DISABLE_DEPRECATION_WARNINGS f->qscale_table = buf->data; f->qstride = stride; f->qscale_type = qp_type; @@ -66,12 +65,12 @@ int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type) FF_DISABLE_DEPRECATION_WARNINGS *stride = f->qstride; *type = f->qscale_type; -FF_ENABLE_DEPRECATION_WARNINGS if (!f->qp_table_buf) return NULL; return f->qp_table_buf->data; +FF_ENABLE_DEPRECATION_WARNINGS } #endif @@ -520,7 +519,9 @@ void av_frame_unref(AVFrame *frame) av_freep(&frame->extended_buf); av_dict_free(&frame->metadata); #if FF_API_FRAME_QP +FF_DISABLE_DEPRECATION_WARNINGS av_buffer_unref(&frame->qp_table_buf); +FF_ENABLE_DEPRECATION_WARNINGS #endif av_buffer_unref(&frame->hw_frames_ctx); |