On Thu, Aug 02, 2012 at 03:37:28PM -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..699c1b7 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 <= 0) {
> +        av_log(avctx, AV_LOG_ERROR, "invalid sample rate\n");
> +        return AVERROR_INVALIDDATA;
> +    }
> +
>      s->num_channels = avctx->channels;
>  
>      if (s->num_channels < 0) {
> -- 

LGTM
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to