PR #20959 opened by mux47 URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20959 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20959.patch
Avoid calling ff_opus_parse_packet() on flush (buf_size == 0) Fixes spurious 'Error parsing Opus packet header' in complete-frames mode at EOF. Related: FFmpeg/FFmpeg#20954 >From 635ccf83f312279157daed2ca1a79550ff51f3b1 Mon Sep 17 00:00:00 2001 From: mux47 <[email protected]> Date: Tue, 18 Nov 2025 16:43:49 +0000 Subject: [PATCH] Update libavcodec/opus/parser.c Avoid calling ff_opus_parse_packet() on flush (buf_size == 0) Fixes spurious 'Error parsing Opus packet header' in complete-frames mode at EOF. Related: FFmpeg/FFmpeg#20954 --- libavcodec/opus/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/opus/parser.c b/libavcodec/opus/parser.c index ae3d66592c..bab0e50412 100644 --- a/libavcodec/opus/parser.c +++ b/libavcodec/opus/parser.c @@ -189,7 +189,7 @@ static int opus_parse(AVCodecParserContext *ctx, AVCodecContext *avctx, if (ctx->flags & PARSER_FLAG_COMPLETE_FRAMES) { next = buf_size; - if (set_frame_duration(ctx, avctx, buf, buf_size) < 0) + if (buf_size && set_frame_duration(ctx, avctx, buf, buf_size) < 0) goto fail; } else { next = opus_find_frame_end(ctx, avctx, buf, buf_size, &header_len); -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
