This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new b4d11dffbf avformat/rtpdec_av1: fix operator precedence in packet 
allocation
b4d11dffbf is described below

commit b4d11dffbf254d0f6f0fef553e1065a94fefd224
Author:     Zhao Zhili <[email protected]>
AuthorDate: Thu May 14 21:46:21 2026 +0800
Commit:     Zhao Zhili <[email protected]>
CommitDate: Mon May 18 04:00:18 2026 +0000

    avformat/rtpdec_av1: fix operator precedence in packet allocation
    
    The closing parenthesis in the av_new_packet() branch was misplaced,
    making result store the boolean comparison instead of the AVERROR
    code, so allocation failures were silently lost.
    
    av_grow_packet() handles both an empty and a non-empty packet, so use
    it for both cases and drop the broken branch.
    
    Signed-off-by: Zhao Zhili <[email protected]>
---
 libavformat/rtpdec_av1.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/libavformat/rtpdec_av1.c b/libavformat/rtpdec_av1.c
index 91f75326f7..f6b1048328 100644
--- a/libavformat/rtpdec_av1.c
+++ b/libavformat/rtpdec_av1.c
@@ -278,13 +278,9 @@ static int av1_handle_packet(AVFormatContext *ctx, 
PayloadContext *data,
             if (data->needs_td) {
                 output_size += 2; // for Temporal Delimiter (TD)
             }
-            if (pkt->data) {
-                if ((result = av_grow_packet(pkt, output_size)) < 0)
-                    return result;
-            } else {
-                if ((result = av_new_packet(pkt, output_size) < 0))
-                    return result;
-            }
+            result = av_grow_packet(pkt, output_size);
+            if (result < 0)
+                return result;
 
             if (data->needs_td) {
                 // restore TD

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

Reply via email to