ffmpeg | branch: master | Dawid Kozinski <d.kozin...@samsung.com> | Tue May 6 11:28:29 2025 +0200| [219f234e077f315a76de245cab76ebecf88aff65] | committer: James Almer
avformat/mov: add support for APV streams Signed-off-by: Dawid Kozinski <d.kozin...@samsung.com> Signed-off-by: James Almer <jamr...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=219f234e077f315a76de245cab76ebecf88aff65 --- Changelog | 1 + libavformat/isom_tags.c | 2 ++ libavformat/mov.c | 7 ++++++- libavformat/version.h | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index f5ec9eafc3..fba0fd3c30 100644 --- a/Changelog +++ b/Changelog @@ -21,6 +21,7 @@ version <next>: - G.728 decoder - pad_cuda filter - Sanyo LD-ADPCM decoder +- APV in MP4/ISOBMFF demuxing version 7.1: diff --git a/libavformat/isom_tags.c b/libavformat/isom_tags.c index f05762beec..69174b4a3f 100644 --- a/libavformat/isom_tags.c +++ b/libavformat/isom_tags.c @@ -299,6 +299,8 @@ const AVCodecTag ff_codec_movvideo_tags[] = { { AV_CODEC_ID_AVS3, MKTAG('a', 'v', 's', '3') }, + { AV_CODEC_ID_APV, MKTAG('a', 'p', 'v', '1') }, + { AV_CODEC_ID_NONE, 0 }, }; diff --git a/libavformat/mov.c b/libavformat/mov.c index 31ebcebca1..c935bbf0bf 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2987,6 +2987,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 */ @@ -9325,6 +9326,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = { { MKTAG('a','m','v','e'), mov_read_amve }, /* ambient viewing environment box */ { MKTAG('l','h','v','C'), mov_read_lhvc }, { MKTAG('l','v','c','C'), mov_read_glbl }, +{ MKTAG('a','p','v','C'), mov_read_glbl }, #if CONFIG_IAMFDEC { MKTAG('i','a','c','b'), mov_read_iacb }, #endif @@ -11032,7 +11034,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)) { diff --git a/libavformat/version.h b/libavformat/version.h index b32ddb3617..b3c03a373b 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -32,7 +32,7 @@ #include "version_major.h" #define LIBAVFORMAT_VERSION_MINOR 1 -#define LIBAVFORMAT_VERSION_MICRO 101 +#define LIBAVFORMAT_VERSION_MICRO 102 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \ _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".