[FFmpeg-devel] [PATCH] h264: Support multi-field closed captions by using AVBufferRef and not resetting per field
Kieran Kunhya
kierank at obe.tv
Mon Jul 10 12:43:09 EEST 2017
On Mon, 10 Jul 2017 at 10:39 wm4 <nfxjfg at googlemail.com> wrote:
>
> > h->frame_recovered = h1->frame_recovered;
> > + if (h1->sei.a53_caption.buf_ref) {
> > + h->sei.a53_caption.buf_ref =
> av_buffer_ref(h1->sei.a53_caption.buf_ref);
> > + av_buffer_unref(&h1->sei.a53_caption.buf_ref);
> > + }
> > + else
> > + h->sei.a53_caption.buf_ref = NULL;
>
> That seems overly convoluted. Since you only want to move the
> reference instead of creating a new one, you could just assign the
> AVBufferRef pointer and assign the source field to NULL.
>
I can't do that, the source is const.
Regards,
Kieran Kunhya
More information about the ffmpeg-devel
mailing list