On 5/8/2025 7:30 AM, Dawid Kozinski wrote: > - Changes in mov_write_video_tag function to handle APV elementary stream > - Provided structure APVDecoderConfigurationRecord that specifies the decoder configuration information for APV video content > > Signed-off-by: Dawid Kozinski > --- > libavformat/Makefile | 2 +- > libavformat/apv.c | 830 ++++++++++++++++++++++++++++++++++++++++ > libavformat/apv.h | 88 +++++ > libavformat/isom_tags.c | 1 + > libavformat/movenc.c | 52 +++ > 5 files changed, 972 insertions(+), 1 deletion(-) > create mode 100644 libavformat/apv.c > create mode 100644 libavformat/apv.h > There's a lot of duplicate parsing code here. We should instead reuse the existing CBS implementation. Add https://gist.github.com/jamrial/631a2b0b7dafb3f0a9596a24621cb79d to make cbs_apv available in lavf and use the CBS API to parse the bitstream (It will have a ff_lavf_cbs_* prefix). See movenccenc.c