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

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Tue Jun 9 22:44:08 CEST 2015


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-sonic-set-avctx-channels-in-sonic_decode_init.patch
Type: text/x-diff
Size: 822 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150609/4e5993ce/attachment.bin>


More information about the ffmpeg-devel mailing list