diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-02 20:52:31 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-12-01 11:00:40 +0100 |
commit | f89825e60a38497abe5f39ff3192b6f276599ef9 (patch) | |
tree | 8aa0c589a48081c473cf99f40944bad66bbf3736 /libavcodec/h264_sei.c | |
parent | de5891d3712cca5acde9c1c0dc9500ff94ac3af2 (diff) | |
download | ffmpeg-f89825e60a38497abe5f39ff3192b6f276599ef9.tar.gz |
avcodec/h2645_sei: Factor out freeing common SEI parts
This commit only factors out freeing the common SEI parts,
not whether the fields indicating whether an SEI is present
shall be reset. H.264 and HEVC differ in this regard
(ff_h264_sei_uninit() really resets, whereas ff_hevc_reset_sei()
only uninits.) and neither actually honours the persistency
as prescribed by the relevant specs.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/h264_sei.c')
-rw-r--r-- | libavcodec/h264_sei.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c index c62aef9246..f11f8371f6 100644 --- a/libavcodec/h264_sei.c +++ b/libavcodec/h264_sei.c @@ -59,11 +59,7 @@ void ff_h264_sei_uninit(H264SEIContext *h) h->common.display_orientation.present = 0; h->common.afd.present = 0; - av_buffer_unref(&h->common.a53_caption.buf_ref); - for (int i = 0; i < h->common.unregistered.nb_buf_ref; i++) - av_buffer_unref(&h->common.unregistered.buf_ref[i]); - h->common.unregistered.nb_buf_ref = 0; - av_freep(&h->common.unregistered.buf_ref); + ff_h2645_sei_reset(&h->common); } int ff_h264_sei_process_picture_timing(H264SEIPictureTiming *h, const SPS *sps, |