[FFmpeg-devel] [PATCH] GSM-MS decoder and encoder

Baptiste Coudurier baptiste.coudurier
Fri Apr 25 12:38:51 CEST 2008


Hi,

Michel Bardiaux wrote:
> Baptiste Coudurier wrote:
>> Hi,
>>
>> [...]
>>
>> Can we please fix this ?
>> http://samples.mplayerhq.hu/A-codecs/GSM/sample-gsm-8000.mov
>>
>> Choose whichever solution you prefer, but this sample should play
>> without error message :>
>>
> Here is a 'permissive' first patch; 13000, 13200, and 0, are accepted
> silently.
> 
> Note that testing that got me to some other problems:
> 
> ./ffmpeg_g -i sample-gsm-8000.mov -acodec pcm_s16le sample-gsm-8000.wav
> |& head -30
> FFmpeg version SVN-r12949, Copyright (c) 2000-2008 Fabrice Bellard, et al.
>   configuration: --enable-libmp3lame --enable-gpl --enable-x11grab
> --enable-libgsm
>   libavutil version: 49.6.0
>   libavcodec version: 51.56.0
>   libavformat version: 52.13.0
>   libavdevice version: 52.0.0
>   built on Apr 25 2008 11:19:51, gcc: 4.1.2 20061115 (prerelease)
> (Debian 4.1.1-21)
> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x843b434]edit list not starting at 0, a/v
> desync might occur, patch welcome
> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x843b434]Could not find codec parameters
> (Data: rtp  / 0x20707472)
> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x843b434]Could not find codec parameters
> (Data: rtp  / 0x20707472)
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample-gsm-8000.mov':
>   Duration: 00:03:31.30, start: 0.000000, bitrate: 17 kb/s
>     Stream #0.0(eng): Audio: libgsm, 8000 Hz, mono
>     Stream #0.1(eng): Subtitle: text / 0x74786574
>     Stream #0.2(eng): Data: rtp  / 0x20707472
>     Stream #0.3(eng): Data: rtp  / 0x20707472
> Multiple frames in a packet from stream 0
> [Repeated many many times]
> 
> This is in ffmpeg.c:output_packet and seems to be due to weird pts'es
> from input,

No, packet contains multiple frames, like error message says.

This illustrates another problem with libgsm decoder: data_size must be
set to 0 before returning if nothing is output.

Also if buf_size < avctx->block_align you should return error (-1) here
IMHO.

> hence a problem in the mov demuxer, but I'm wagging here.
> Anyway, other bug, other thread, no?

Yes, fixed now.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG SAS                                     http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312




More information about the ffmpeg-devel mailing list