[MPlayer-users] Sound problem in 3gp files

mplayer at munton.demon.co.uk mplayer at munton.demon.co.uk
Fri Apr 7 23:42:39 CEST 2006


Hi,

I have a problem with sound playback in 3gp files using the latest cvs code. 
mplayer produces the following message, and there is no sound.

Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 192000 + 65536 = 257536 bytes for output buffer.
FFmpeg's libavcodec audio codec
INFO: libavcodec init OK!
ds_fill_buffer(d_audio) called
seek to 0x82CC
s->pos=9E28  newpos=8000  new_bufpos=82CC  buflen=0
WARNING! Samplesize(64) != 1
Audio sample 5504 bytes pts 0.000
DEMUX: Append packet to d_audio, len=86  pts=0.000  pos=33484  [packs: A=1 
V=0]
Decoded 16 -> 320
AUDIO: 8000 Hz, 1 ch, s16le, 128.0 kbit/100.00% (ratio: 16000->16000)
Selected audio codec: [ffamrnb] afm: ffmpeg (AMR Narrowband)
....
Starting playback...
[amr_nb @ 0x8693da8]amr frame too short (4, should be 16)

Using gdb, I found that only 86 bytes of audio data was being sent to the 
decoder, instead of 5504 bytes. There is some code in demux_mov.c that is 
commented out that corrects for the samplesize not being 1. Putting back the 
commented out code results in correct audio playback.

Following is a diff for the code in question.

--- MPlayer-cvs-20060405/libmpdemux/demux_mov.c.orig    2006-03-27 
22:37:18.000000000 +0100
+++ MPlayer-cvs-20060405/libmpdemux/demux_mov.c 2006-04-07 13:33:53.000000000 
+0100
@@ -1911,9 +1911,9 @@
     {
        mp_msg(MSGT_DEMUX, MSGL_DBG2, "WARNING! Samplesize(%d) != 1\n",
            trak->samplesize);
-//     x=trak->chunks[trak->pos].size*trak->samplesize;
+       x=trak->chunks[trak->pos].size*trak->samplesize;
     }
-//    else
+    else
        x=trak->chunks[trak->pos].size;
 //    printf("X = %d\n", x);
     /* the following stuff is audio related */



Regards

Simon Munton




More information about the MPlayer-users mailing list