The branch, master has been updated
       via  618fc15e65f57c9ce25d4562f4b516129815608c (commit)
      from  cac5018eb9278263e76ccc2891509ed662474853 (commit)


- Log -----------------------------------------------------------------
commit 618fc15e65f57c9ce25d4562f4b516129815608c
Author:     mux47 <[email protected]>
AuthorDate: Tue Nov 18 16:43:49 2025 +0000
Commit:     James Almer <[email protected]>
CommitDate: Thu Nov 27 14:04:20 2025 +0000

    libavcodec/opus/parser: Fix spurious 'Error parsing Opus packet header'
    
    When PARSER_FLAG_COMPLETE_FRAMES is set, opus_parse() calls
    set_frame_duration even on flush (buf_size==0), which triggers
    a spurious "Error parsing Opus packet header" at EOF.
    
    Match streaming-path behavior by skipping duration parsing on empty buffers.
    Fixes #20954

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);

-----------------------------------------------------------------------

Summary of changes:
 libavcodec/opus/parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to