On 07/06/2012 04:41 PM, Anton Khirnov wrote:
> @@ -45,9 +45,12 @@ static int parse_picture(AVFormatContext *s, uint8_t *buf, 
> int buf_size)
>      /* read the picture type */
>      type      = avio_rb32(pb);
>      if (type >= FF_ARRAY_ELEMS(ff_id3v2_picture_types) || type < 0) {
> -        av_log(s, AV_LOG_ERROR, "Invalid picture type: %d.\n", type);
> -        ret = AVERROR_INVALIDDATA;
> -        goto fail;
> +        av_log(s, AV_LOG_WARNING, "Invalid picture type: %d.\n", type);
> +        if (s->error_recognition & AV_EF_EXPLODE) {
> +            ret = AVERROR_INVALIDDATA;
> +            goto fail;
> +        }
> +        type = 0;
>      }

I think that av_log() should remain AV_LOG_ERROR. The rest of the patch
looks ok.

-Justin

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

Reply via email to