> On 27 Jul 2023, at 19:33, Nicolas George <geo...@nsup.org> wrote: > > reimar.doeffin...@gmx.de (12023-07-23): >> From: Reimar Döffinger <reimar.doeffin...@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-requ...@ffmpeg.org with subject "unsubscribe".