[PATCH 3/3] wav: probe for non-pcm audio in case of pcm_s16le (issue70)

Anssi Hannula anssi.hannula
Tue Aug 10 18:53:53 CEST 2010


---
 libavformat/wav.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/libavformat/wav.c b/libavformat/wav.c
index da08558..02ff65a 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -220,6 +220,12 @@ static int wav_read_header(AVFormatContext *s,
     ff_get_wav_header(pb, st->codec, size);
     st->need_parsing = AVSTREAM_PARSE_FULL;
 
+    if (st->codec->codec_id == CODEC_ID_PCM_S16LE) {
+        st->probe_fallback_codec_id = st->codec->codec_id;
+        st->codec->codec_id = CODEC_ID_PROBE;
+        st->codec->sample_fmt = SAMPLE_FMT_S16;
+    }
+
     av_set_pts_info(st, 64, 1, st->codec->sample_rate);
 
     size = find_tag(pb, MKTAG('d', 'a', 't', 'a'));
-- 
1.7.2


--Boundary-00=_S0YYMo0jwG/RQ63--



More information about the ffmpeg-devel mailing list