[FFmpeg-devel] [PATCH] matroska: Ensure sample rate is always >= 1.

Dale Curtis dalecurtis at chromium.org
Fri Apr 20 23:36:22 CEST 2012

On Thu, Apr 19, 2012 at 3:59 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> well my thoughts would be:
> theres not much code in matroskadec that reads the sample rate
> so a hypothetical issue should be outside matroskadec and for these
> any fix should probably also be outside matroskadec.
> If <= 0 values really posed a problem that could be handled in generic
> code and not be dependant on every demuxer having such a check.
> also turning a invalid value silently to a valid one that is with
> near certainity not correct feels non ideal
> In the end the patch looks unneeded to me but i cannot say with
> certainity that it is unneeded and theres no corner case in no
> piece of code that might be better of without negative or even or
> prime numbers ...

Thanks for the insight Michael :) The patch can be abandoned, if I
find a test case which results in issues we can fix them at the proper
call sites.

- dale

More information about the ffmpeg-devel mailing list