]> git.sesse.net Git - ffmpeg/commitdiff
avformat/argo_brp: use header frame counts
authorZane van Iperen <zane@zanevaniperen.com>
Sat, 26 Sep 2020 02:21:45 +0000 (12:21 +1000)
committerZane van Iperen <zane@zanevaniperen.com>
Sat, 26 Sep 2020 23:11:36 +0000 (09:11 +1000)
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
libavformat/argo_brp.c

index af64a0d6dc18985155d376e18eb2e5767042b8bd..76b4da2e6613f793350f937af22dbc8929a75e02 100644 (file)
@@ -237,6 +237,8 @@ static int argo_brp_read_header(AVFormatContext *s)
                 avpriv_request_sample(s, "depth == %u", bvid->depth);
                 return AVERROR_PATCHWELCOME;
             }
+
+            st->nb_frames = bvid->num_frames;
         } else if (hdr->codec_id == BRP_CODEC_ID_BASF) {
             /*
              * It would make the demuxer significantly more complicated
@@ -255,6 +257,8 @@ static int argo_brp_read_header(AVFormatContext *s)
 
             if ((ret = ff_argo_asf_validate_file_header(s, &hdr->extradata.basf)) < 0)
                 return ret;
+
+            st->nb_frames = hdr->extradata.basf.num_chunks;
         } else if (hdr->codec_id == BRP_CODEC_ID_MASK) {
             ArgoMASKHeader *mask = &hdr->extradata.mask;