On Thursday, August 2, 2012, Kostya Shishkov <[email protected]> wrote: > On Wed, Aug 01, 2012 at 11:23:52PM -0400, Sean McGovern wrote: >> This fixes Bugzilla #327: >> --- >> libavcodec/wmaprodec.c | 5 +++++ >> 1 files changed, 5 insertions(+), 0 deletions(-) >> >> diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c >> index 30a43c8..88c33c3 100644 >> --- a/libavcodec/wmaprodec.c >> +++ b/libavcodec/wmaprodec.c >> @@ -335,6 +335,11 @@ static av_cold int decode_init(AVCodecContext *avctx) >> return AVERROR_INVALIDDATA; >> } >> >> + if (!s->avctx->sample_rate) { >> + av_log(avctx, AV_LOG_ERROR, "invalid sample rate\n"); >> + return AVERROR_INVALIDDATA; >> + } >> + >> s->num_channels = avctx->channels; >> >> if (s->num_channels < 0) { >> -- > > Is sample_rate still signed? If yes then the check should be amended to <= 0, > otherwise patch looks fine.
It is indeed still signed -- new patch will be sent shortly. -- Sean McG.
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
