ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | 
Thu May  1 20:11:25 2025 +0200| [85887703670e3e2fbcbf09f4176abadd6e1d7139] | 
committer: Andreas Rheinhardt

avformat/av1dec: Avoid branch for setting position

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=85887703670e3e2fbcbf09f4176abadd6e1d7139
---

 libavformat/av1dec.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/libavformat/av1dec.c b/libavformat/av1dec.c
index 536422959e..0a81db4ef0 100644
--- a/libavformat/av1dec.c
+++ b/libavformat/av1dec.c
@@ -275,17 +275,18 @@ end:
     }
 
     ret = av_bsf_receive_packet(c->bsf, pkt);
-    if (ret < 0 && ret != AVERROR(EAGAIN) && ret != AVERROR_EOF)
-        av_log(s, AV_LOG_ERROR, "av1_frame_merge filter failed to "
-                                "send output packet\n");
-
-    if (ret == AVERROR(EAGAIN))
-        goto retry;
+    if (ret < 0) {
+        if (ret == AVERROR(EAGAIN))
+            goto retry;
+        if (ret != AVERROR_EOF)
+            av_log(s, AV_LOG_ERROR, "av1_frame_merge filter failed to "
+                                    "send output packet\n");
+        return ret;
+    }
 
-    if (!ret)
-        pkt->pos = pos;
+    pkt->pos = pos;
 
-    return ret;
+    return 0;
 }
 
 const FFInputFormat ff_av1_demuxer = {

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to