@@ -35,6 +35,7 @@
#include "atsc_a53.h"
#include "avcodec.h"
+#include "decode.h"
#include "dynamic_hdr_vivid.h"
#include "get_bits.h"
#include "golomb.h"
@@ -607,12 +608,11 @@ int ff_h2645_sei_to_frame(AVFrame *frame, H2645SEI *sei,
H2645SEIUnregistered *unreg = &sei->unregistered;
if (unreg->buf_ref[i]) {
- AVFrameSideData *sd = av_frame_new_side_data_from_buf(frame,
+ int ret = ff_frame_new_side_data_from_buf(avctx, frame,
AV_FRAME_DATA_SEI_UNREGISTERED,
- unreg->buf_ref[i]);
- if (!sd)
- av_buffer_unref(&unreg->buf_ref[i]);
- unreg->buf_ref[i] = NULL;
+ &unreg->buf_ref[i], NULL);
+ if (ret < 0)
+ return ret;
}
}
sei->unregistered.nb_buf_ref = 0;