- Added apv extension to the list of extensions for ff_mov_demuxer

Signed-off-by: Dawid Kozinski <d.kozin...@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)) {
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to