[FFmpeg-cvslog] avformat/argo_asf: fix handling of v1.1 files

Zane van Iperen git at videolan.org
Sat Nov 7 16:30:38 EET 2020


ffmpeg | branch: release/4.3 | Zane van Iperen <zane at zanevaniperen.com> | Sat Sep  5 21:30:12 2020 +1000| [4fdc632a9005c580613c15f5ccf42302c4643c73] | committer: Zane van Iperen

avformat/argo_asf: fix handling of v1.1 files

Version 1.1 (FX Fighter) files all have a sample rate of 44100
in the header, but only play back correctly at 22050.

Force the sample rate to 22050 when reading, and restrict it
when muxing.

(cherry picked from commit d2f7b399149f725138f5551ae980e755596d527c)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4fdc632a9005c580613c15f5ccf42302c4643c73
---

 libavformat/argo_asf.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavformat/argo_asf.c b/libavformat/argo_asf.c
index 3339425244..abc6e51baa 100644
--- a/libavformat/argo_asf.c
+++ b/libavformat/argo_asf.c
@@ -175,7 +175,11 @@ static int argo_asf_read_header(AVFormatContext *s)
         st->codecpar->channels              = 1;
     }
 
-    st->codecpar->sample_rate               = asf->ckhdr.sample_rate;
+    /* v1.1 files (FX Fighter) are all marked as 44100, but are actually 22050. */
+    if (asf->fhdr.version_major == 1 && asf->fhdr.version_minor == 1)
+        st->codecpar->sample_rate           = 22050;
+    else
+        st->codecpar->sample_rate           = asf->ckhdr.sample_rate;
 
     st->codecpar->bits_per_coded_sample     = 4;
 



More information about the ffmpeg-cvslog mailing list