Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
- index ede9a1a6ea..ade874b70e 100644
- --- a/libavcodec/h264_slice.c
- +++ b/libavcodec/h264_slice.c
- @@ -1269,15 +1269,14 @@ static int h264_export_frame_props(H264Context *h)
- }
- }
- - if (h->sei.a53_caption.a53_caption) {
- + if (h->sei.a53_caption.buf_ref) {
- H264SEIA53Caption *a53 = &h->sei.a53_caption;
- - AVFrameSideData *sd = av_frame_new_side_data(cur->f,
- + AVFrameSideData *sd = av_frame_new_side_data_from_buf(cur->f,
- AV_FRAME_DATA_A53_CC,
- - a53->a53_caption_size);
- - if (sd)
- - memcpy(sd->data, a53->a53_caption, a53->a53_caption_size);
- - av_freep(&a53->a53_caption);
- - a53->a53_caption_size = 0;
- + a53->buf_ref);
- + if (!sd) {
- + av_buffer_unref(&a53->buf_ref);
- + a53->buf_ref = NULL;
- h->avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS;
- }
Advertisement
Add Comment
Please, Sign In to add comment