[FFmpeg-devel] [PATCH 1/2] lavc/internal: add skip_samples2 field

Anton Khirnov anton at khirnov.net
Thu Oct 19 18:50:55 EEST 2023


Quoting Lynne (2023-10-19 14:49:46)
> Oct 19, 2023, 10:39 by anton at khirnov.net:
> 
> > Current interaction between AV_FRAME_DATA_SKIP_SAMPLES and
> > AVCodecContext.skip_samples seems unncecessarily complicated to me and
> > you're just making it worse.
> >
> > Is there any reason we can't drop AVCodecContext.skip_samples entirely
> > and signal it purely through side data? Then decoders could fully
> > control everything they wish by modifying side data on output frames.
> >
> 
> You mean let the decoder parse skip samples side data,
> strip it from the packet, and attach a new side data to the frame?

Not from the packet - that should be const for decoders. The generic
code currently translates AV_PKT_DATA_SKIP_SAMPLES from the packet to
the frame in ff_get_buffer(). The decoder can then override that in the
frame.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list