[FFmpeg-devel] [PATCH] sonic: use s->channels instead of avctx->channels

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Tue Jun 9 23:23:40 CEST 2015


On 09.06.2015 23:04, Michael Niedermayer wrote:
> On Tue, Jun 09, 2015 at 10:44:08PM +0200, Andreas Cadhalpun wrote:
>> On 09.06.2015 22:30, Michael Niedermayer wrote:
>>> On Tue, Jun 09, 2015 at 10:22:05PM +0200, Andreas Cadhalpun wrote:
>>>> avctx->channels can be 0, causing SIGFPE crashes.
>>>>
>>>> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
>>>> ---
>>>>  libavcodec/sonic.c | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> i think avctx->channels should be set, channels is only set during
>>> init and cannot change per frame in sonic
>>> maybe avctx->channels could be set during init
>>
>> Yes, that's way better, because it actually allows decoding such samples.
>> New patch attached.
>>
>> Best regards,
>> Andreas
>>
> 
>>  sonic.c |    1 +
>>  1 file changed, 1 insertion(+)
>> 3eb2f8fa1f33a5d4ab0434d45a1d584b1774fa3a  0001-sonic-set-avctx-channels-in-sonic_decode_init.patch
>> From 489bc2758317c5534ae1292c3f772e0dc870d0e4 Mon Sep 17 00:00:00 2001
>> From: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
>> Date: Tue, 9 Jun 2015 22:41:24 +0200
>> Subject: [PATCH] sonic: set avctx->channels in sonic_decode_init
>>
>> Otherwise it can be 0 in sonic_decode_frame causing SIGFPE crashes.
> 
> LGTM

Pushed.

Best regards,
Andreas



More information about the ffmpeg-devel mailing list