Opened 11 years ago

Closed 11 years ago

#3550 closed defect (fixed)

[wavdec]DTS in wave can not be recognized

Reported by: adam_csheng Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: wav dca
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

% ffprobe $ISSUE_FILE
Issue output:
"
csheng@BG2BLT05:~/ffmpeg/ffmpeg$ ./ffprobe ../WorstCase.wav
ffprobe version N-62341-gd9fef74 Copyright (c) 2007-2014 the FFmpeg developers
  built on Apr 11 2014 03:00:27 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration:
  libavutil      52. 75.100 / 52. 75.100
  libavcodec     55. 58.103 / 55. 58.103
  libavformat    55. 36.103 / 55. 36.103
  libavdevice    55. 11.100 / 55. 11.100
  libavfilter     4.  4.100 /  4.  4.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 18.100 /  0. 18.100
Input #0, wav, from '../WorstCase.wav':
  Duration: 00:00:41.89, bitrate: 1536 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 2 channels, s16, 1536 kb/s
"
ffmpeg version: N-62341-gd9fef74 (master)

But it should be dts.
After modify as below:

diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index daea64e..a865b76 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -114,7 +114,7 @@ static void handle_stream_probing(AVStream *st)
 {
     if (st->codec->codec_id == AV_CODEC_ID_PCM_S16LE) {
         st->request_probe = AVPROBE_SCORE_EXTENSION;
-        st->probe_packets = FFMIN(st->probe_packets, 4);
+        st->probe_packets = FFMIN(st->probe_packets, 14);
     }
 }

It should be correct:

csheng@BG2BLT05:~/ffmpeg/ffmpeg$ ./ffprobe ../WorstCase.wav
ffprobe version N-62341-gd9fef74 Copyright (c) 2007-2014 the FFmpeg developers
  built on Apr 11 2014 03:00:27 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration:
  libavutil      52. 75.100 / 52. 75.100
  libavcodec     55. 58.103 / 55. 58.103
  libavformat    55. 36.103 / 55. 36.103
  libavdevice    55. 11.100 / 55. 11.100
  libavfilter     4.  4.100 /  4.  4.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 18.100 /  0. 18.100
[dca @ 0x2c36e80] Not a valid DCA frame
[dca @ 0x2c36e80] Number of channels changed in DCA decoder (2 -> 6)
Input #0, wav, from '../WorstCase.wav':
  Duration: 00:00:41.89, bitrate: 1536 kb/s
    Stream #0:0: Audio: dts (DTS) ([1][0][0][0] / 0x0001), 48000 Hz, 5.1(side), fltp, 384 kb/s

If you need issue file, please contact me.

Attachments (2)

WorstCase.wav (2.0 MB ) - added by adam_csheng 11 years ago.
0001-avformat-wavdec-enlarge-probe_packets-for-wav.patch (798 bytes ) - added by adam_csheng 11 years ago.
the fix patch by myself

Change History (8)

by adam_csheng, 11 years ago

Attachment: WorstCase.wav added

comment:1 by Carl Eugen Hoyos, 11 years ago

Analyzed by developer: unset
Keywords: wav added
Status: newopen

Please send patches (made with git format-patch) to the ffmpeg-devel mailing list where they get more attention and can be reviewed.

comment:2 by adam_csheng, 11 years ago

Have sent mail to ffmpeg-devel.

by adam_csheng, 11 years ago

the fix patch by myself

comment:3 by adam_csheng, 11 years ago

The mail sent to trac@avcodec.org, ffmpeg-trac@avcodec.org and ffmpeg-devel@avcodec.org fail, I attached the patch, please refer to the attachment: 0001-avformat-wavdec-enlarge-probe_packets-for-wav.patch

comment:4 by Carl Eugen Hoyos, 11 years ago

http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Where did you find the other addresses?

in reply to:  4 comment:5 by adam_csheng, 11 years ago

Replying to cehoyos:

http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Where did you find the other addresses?

Sorry, I through it was ffmepg-devel@avcodec.org according ffmpeg-devel@avcodec.org, have sent to ffmpeg-devel@ffmpeg.org.

comment:6 by Carl Eugen Hoyos, 11 years ago

Keywords: dca added
Resolution: fixed
Status: openclosed

Your patch was applied in 549bbdfb
Thank you for the report and the fix!

Note: See TracTickets for help on using tickets.