[FFmpeg-devel] [PATCH] aiffdec: fix division by zero
andreas.cadhalpun at googlemail.com
Thu Oct 20 21:11:19 EEST 2016
On 20.10.2016 02:56, Michael Niedermayer wrote:
> On Wed, Oct 19, 2016 at 09:18:51PM +0200, Andreas Cadhalpun wrote:
>> This is similar to commit c143a9c.
>> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
>> libavformat/aiffdec.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
> can aiff work without block_align ?
Well, it can use a fall-back value. That value can be wrong, of course.
> either way, block_duration is from the header reading
> if its still accurate then using it together with 1 instead of the
> matching block align is quite likely not correct
> OTOH if block_duration does not represent the actual content then
> the duration would only be correct by pure chance
> Its a bit unfortunate that theres no usecase with an undamaged sample
> which would have clear correct values
> one has to work on the assumptation of a use case where the user needs
> to override the codec and then ask "what is correct to do" that makes
> this a bit tricky ...
Alternatively aiff_read_packet could just error out, if you prefer that.
Patch doing that attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 992 bytes
Desc: not available
More information about the ffmpeg-devel