[Ffmpeg-devel] [PATCH] avctx->frame_size/channels/sample_rate fix for AMR

Benjamin Larsson banan
Thu Sep 14 17:10:15 CEST 2006


Michael Niedermayer skrev:
> Hi
>
> On Thu, Sep 14, 2006 at 04:31:33PM +0200, Benjamin Larsson wrote:
>   
>> Michael Niedermayer skrev:
>>     
>>> [...]
>>>       
>>>> ===================================================================
>>>> --- libavcodec/amr.c	(revision 6250)
>>>> +++ libavcodec/amr.c	(working copy)
>>>> @@ -143,6 +143,11 @@
>>>>         av_log(avctx, AV_LOG_ERROR, "Speech_Decode_Frame_init error\n");
>>>>         return -1;
>>>>     }
>>>> +
>>>> +    avctx->sample_rate = 8000;
>>>>    
>>>>         
>>> wont that break amr stored in containers with a sample_rate different from
>>> that?
>>>  
>>>       
>> AMR NB can only be used with a 8khz sample rate. If the container uses 
>> some other value the container is wrong.
>>     
>
> so we should drop support for VBR mpeg1 and and mpeg1/2 with non standard
> framerates, and h263 with a framerate different from 30000/1001 ?
> this will lead to alot of bugreports ...
>
> if we dont drop all these then why amr with non-standard samplerates?
>   

Well amr is a speech codec tuned at 8000 Hz, I don't think there is any 
encoder that produces amr streams at other samplerates. What I do think 
exists are a few files with the samplerate set to something other then 
8000Hz. And that is what this would fix.
> [...]
>   

MvH
Benjamin Larsson




More information about the ffmpeg-devel mailing list