From: Anton Khirnov <anton@khirnov.net>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] libavformat/flac_picture: Don't return AVERROR_INVALIDDATA for errors with flac picture mimetype
Date: Wed, 28 Sep 2022 16:17:17 +0200
Message-ID: <166437463764.22057.4742937177788601515@lain.khirnov.net> (raw)
In-Reply-To: <2fbbb930-fafa-8fea-b7c4-fd2a15289958@gmail.com>
Quoting James Almer (2022-09-10 03:16:32)
> On 9/9/2022 7:44 PM, Will Cassella wrote:
> > In the case where the FLAC picture MIME type is not understood, fail to
> > parse the picture silently rather than return AVERROR_INVALIDDATA.
> >
> > This originated from a bug reported in Chromium: https://crbug.com/1052821
> >
> > Signed-off-by: Will Cassella <cassew@google.com>
> > ---
> > libavformat/flac_picture.c | 4 ----
> > 1 file changed, 4 deletions(-)
> >
> > diff --git a/libavformat/flac_picture.c b/libavformat/flac_picture.c
> > index b33fee75b4..1acad9b251 100644
> > --- a/libavformat/flac_picture.c
> > +++ b/libavformat/flac_picture.c
> > @@ -68,8 +68,6 @@ int ff_flac_parse_picture(AVFormatContext *s,
> > uint8_t **bufp, int buf_size,
> > if (len <= 0 || len >= sizeof(mimetype)) {
> > av_log(s, AV_LOG_ERROR, "Could not read mimetype from an attached "
> > "picture.\n");
> > - if (s->error_recognition & AV_EF_EXPLODE)
> > - return AVERROR_INVALIDDATA;
>
> If you don't want to error out, then don't enable explode mode, which is
> meant to abort on the slightest issue?
IMO failing to recognize the MIME type is a lavf error rather than a
file error and so should not fail, much less with AVERROR_INVALIDDATA
(should be ENOSYS if anything).
THe other error should stay though - then the file actually is broken.
--
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-09-28 14:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-09 22:44 Will Cassella
2022-09-10 1:16 ` James Almer
2022-09-20 22:01 ` Will Cassella
2022-09-28 14:17 ` Anton Khirnov [this message]
2023-04-10 17:54 ` Dale Curtis
2024-03-27 20:05 ` Dale Curtis
2024-03-28 17:06 ` Michael Niedermayer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=166437463764.22057.4742937177788601515@lain.khirnov.net \
--to=anton@khirnov.net \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git