[FFmpeg-devel] [PATCH 3/6] avcodec/h264_slice: export S12M timecode side data

Hendrik Leppkes h.leppkes at gmail.com
Wed Jul 15 20:01:33 EEST 2020


On Wed, Jul 15, 2020 at 5:52 PM <lance.lmwang at gmail.com> wrote:
>
> On Wed, Jul 15, 2020 at 04:16:38PM +0100, Kieran Kunhya wrote:
> > If you look a few lines above, we already set the timecode side data.
> >
>
> are you saying av_frame_new_side_data() above?  that's total different, in fact,
> I'm try to use the same way with ff_add_cpb_side_data(), it'll put TC in the codec
> level: avctx->nb_coded_side_data instead of frame level. By this way, I can export
> the correct TC in the following patch for movenc, dv file format. Please refer to:
> libavformat/utils.c line 4154 add_coded_side_data() is used to copy all AVPacketSideData
> side data to st level. If someone have better way to reuse the frame side
> data, please give your advice.
>

CBP is a stream-level property, it doesn't usually change.
Timecodes are a per-frame property. There is no reason to store them
globally in avctx.

There is a big difference between those two. TC should be a per-frame
property, and if a muxer needs it, then the muxer should figure it out
from packets, not from a global store.

- Hendrik


More information about the ffmpeg-devel mailing list