Mercurial > libavformat.hg
diff asf.c @ 2018:0d9b233dff9b libavformat
DVR-MS probe audio format
patch by John Donaghy \ johnfdonaghy chez gmail dot com /
Original thread:
date: 03/13/2007 04:56 PM
subject: [Ffmpeg-devel] [PATCH] DVR-MS probe audio format - was DVR-MS bug (MP2 decoding)
author | benoit |
---|---|
date | Thu, 12 Apr 2007 08:11:33 +0000 |
parents | 1a3c9056982a |
children | a3e79d6e4e3c |
line wrap: on
line diff
--- a/asf.c Tue Apr 10 14:10:36 2007 +0000 +++ b/asf.c Thu Apr 12 08:11:33 2007 +0000 @@ -195,7 +195,7 @@ uint64_t total_size; unsigned int tag1; int64_t pos1, pos2; - int test_for_ext_stream_audio; + int test_for_ext_stream_audio, is_dvr_ms_audio=0; pos1 = url_ftell(pb); @@ -241,6 +241,7 @@ get_guid(pb, &g); if (!memcmp(&g, &ext_stream_audio_stream, sizeof(GUID))) { type = CODEC_TYPE_AUDIO; + is_dvr_ms_audio=1; get_guid(pb, &g); get_le32(pb); get_le32(pb); @@ -253,6 +254,12 @@ st->codec->codec_type = type; if (type == CODEC_TYPE_AUDIO) { get_wav_header(pb, st->codec, type_specific_size); + if (is_dvr_ms_audio) { + // codec_id and codec_tag are unreliable in dvr_ms + // files. Set them later by probing stream. + st->codec->codec_id = CODEC_ID_NONE; + st->codec->codec_tag = 0; + } st->need_parsing = 1; /* We have to init the frame size at some point .... */ pos2 = url_ftell(pb);