From: "Reimar Döffinger" <Reimar.Doeffinger@gmx.de>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] libaformat: fix incorrect handling of incomplete AVBPrint.
Date: Thu, 27 Jul 2023 19:42:06 +0200
Message-ID: <E46A955C-31DD-4CAE-8125-2BA2E9620497@gmx.de> (raw)
In-Reply-To: <ZMKqVcJyPsoHq4JD@phare.normalesup.org>
> On 27 Jul 2023, at 19:33, Nicolas George <george@nsup.org> wrote:
>
> Reimar.Doeffinger@gmx.de (12023-07-23):
>> From: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
>>
>> Change some internal APIs a bit to make it harder to make
>> such mistakes.
>> In particular, have the read chunk functions return an error
>> when the result is incomplete.
>> This might be less flexible, but since there has been no
>> use-case for that so far, avoiding coding mistakes seems better.
>> Add a function to queue a AVBPrint directly (ff_subtitles_queue_insert_bprint).
>> Also fixes a leak in lrcdec when ff_subtitles_queue_insert fails.
>> ---
>> libavformat/assdec.c | 4 +++-
>> libavformat/lrcdec.c | 7 ++++++-
>> libavformat/mpsubdec.c | 5 +++--
>> libavformat/realtextdec.c | 6 +++++-
>> libavformat/samidec.c | 6 +++++-
>> libavformat/srtdec.c | 4 +++-
>> libavformat/subtitles.c | 17 +++++++++++++----
>> libavformat/subtitles.h | 14 ++++++++++++--
>> libavformat/tedcaptionsdec.c | 2 +-
>> libavformat/webvttdec.c | 4 +++-
>> 10 files changed, 54 insertions(+), 15 deletions(-)
>
> Sorry I forgot I meant to review. These changes look for the best,
> except
>
>> + if (!av_bprint_is_complete(event)) return NULL;
>
>> + if (i == INT_MAX) return AVERROR_INVALIDDATA;
>
> … which do not follow the coding style.
Thanks, sent a new version with that updated, plus a fix for a typo
in the commit message.
_______________________________________________
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:[~2023-07-27 17:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <12826EED-5CFC-4DC4-ACEE-0BB505704FE7@reimardoeffinger.de>
2023-07-23 12:00 ` Reimar.Doeffinger
2023-07-27 17:26 ` Reimar Döffinger
2023-07-27 17:33 ` Nicolas George
2023-07-27 17:40 ` [FFmpeg-devel] [PATCH] libavformat: " Reimar.Doeffinger
2023-07-27 17:42 ` Reimar Döffinger [this message]
2023-07-27 17:44 ` [FFmpeg-devel] [PATCH] libaformat: " Nicolas George
2023-07-29 14:31 ` Reimar Döffinger
2023-06-22 21:04 Reimar.Doeffinger
2023-06-23 1:01 ` James Almer
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=E46A955C-31DD-4CAE-8125-2BA2E9620497@gmx.de \
--to=reimar.doeffinger@gmx.de \
--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