[FFmpeg-devel] [PATCH v1] avformat/mov_demuxer: Extended MOV demuxer to handle APV video content
James Almer
jamrial at gmail.com
Mon Jul 7 16:50:17 EEST 2025
On 5/6/2025 6:28 AM, Dawid Kozinski wrote:
> - Added apv extension to the list of extensions for ff_mov_demuxer
>
> Signed-off-by: Dawid Kozinski <d.kozinski at samsung.com>
> ---
> libavformat/demux.c | 1 +
> libavformat/mov.c | 7 ++++++-
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/demux.c b/libavformat/demux.c
> index 2795863567..4e76de0629 100644
> --- a/libavformat/demux.c
> +++ b/libavformat/demux.c
> @@ -126,6 +126,7 @@ static int set_codec_from_probe_data(AVFormatContext *s, AVStream *st,
> { "truehd", AV_CODEC_ID_TRUEHD, AVMEDIA_TYPE_AUDIO },
> { "evc", AV_CODEC_ID_EVC, AVMEDIA_TYPE_VIDEO },
> { "vvc", AV_CODEC_ID_VVC, AVMEDIA_TYPE_VIDEO },
> + { "apv", AV_CODEC_ID_APV, AVMEDIA_TYPE_VIDEO },
> { 0 }
> };
> int score;
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index cb81b6c4da..b7495b33ed 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -2982,6 +2982,7 @@ static int mov_finalize_stsd_codec(MOVContext *c, AVIOContext *pb,
> case AV_CODEC_ID_VP9:
> sti->need_parsing = AVSTREAM_PARSE_FULL;
> break;
> + case AV_CODEC_ID_APV:
> case AV_CODEC_ID_EVC:
> case AV_CODEC_ID_AV1:
> /* field_order detection of H264 requires parsing */
> @@ -9318,6 +9319,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = {
> #if CONFIG_IAMFDEC
> { MKTAG('i','a','c','b'), mov_read_iacb },
> #endif
> +{ MKTAG('a','p','v','C'), mov_read_glbl },
> { 0, NULL }
> };
>
> @@ -11022,7 +11024,10 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
> return FFERROR_REDO;
> }
> #endif
> - else
> + else if(st->codecpar->codec_id == AV_CODEC_ID_APV && sample->size > 4) {
> + const uint32_t au_size = avio_rb32(sc->pb);
> + ret = av_get_packet(sc->pb, pkt, au_size);
> + } else
> ret = av_get_packet(sc->pb, pkt, sample->size);
> if (ret < 0) {
> if (should_retry(sc->pb, ret)) {
Will apply.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250707/59a774ae/attachment.sig>
More information about the ffmpeg-devel
mailing list