On 02/02/2012 12:32 PM, Diego Biurrun wrote: > On Thu, Feb 02, 2012 at 05:09:13PM +0000, Paul B Mahol wrote: >> On 2/2/12, Diego Biurrun <[email protected]> wrote: >>> On Wed, Feb 01, 2012 at 08:23:32PM +0000, Paul B Mahol wrote: >>>> >>>> --- a/libavcodec/frwu.c >>>> +++ b/libavcodec/frwu.c >>>> @@ -28,7 +28,7 @@ static av_cold int decode_init(AVCodecContext *avctx) >>>> { >>>> if (avctx->width & 1) { >>>> av_log(avctx, AV_LOG_ERROR, "FRWU needs even width\n"); >>>> - return -1; >>>> + return AVERROR_INVALIDDATA; >>> >>> This is not HEAD, what did you create your patch against? >> >> This is already pushed. > > No, it is not, the rest of the patch applies, only here we have > AVERROR(EINVAL) instead of -1. However, I believe AVERROR_INVALIDDATA > is more correct here, as the value is not user-supplied.
Why do you think this? The user is providing avctx->width. Sure, they likely didn't pull it out of their ass, but libavcodec doesn't know that. If we were reading the width from extradata and setting it in the decoder that would be different, but this is an AVCodecContext field that has been set by the user, and the decoder is just validating it. -Justin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
