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

Git pushed a commit to branch master
in repository ffmpeg.

commit 58e5ec8a5af990569c9256c2a4c991f3847f6dbb
Author:     Niklas Haas <[email protected]>
AuthorDate: Wed Jun 10 15:43:34 2026 +0200
Commit:     Niklas Haas <[email protected]>
CommitDate: Sun Jun 14 11:10:12 2026 +0200

    avformat/shared: allocate fallback buffer unconditionally
    
    Needed for the upcoming commit, but also more robust in general. The memory
    waste is negligible.
    
    Sponsored-by: nxtedition AB
    Signed-off-by: Niklas Haas <[email protected]>
---
 libavformat/shared.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/libavformat/shared.c b/libavformat/shared.c
index 74000d76db..1030613479 100644
--- a/libavformat/shared.c
+++ b/libavformat/shared.c
@@ -315,13 +315,11 @@ static int shared_open(URLContext *h, const char *arg, 
int flags, AVDictionary *
         }
     }
 
-    if (!s->cache_data) {
-        /* Temporary buffer needed for pread/pwrite() fallback */
-        s->tmp_buf = av_malloc(s->block_size);
-        if (!s->tmp_buf) {
-            ret = AVERROR(ENOMEM);
-            goto fail;
-        }
+    /* Temporary buffer needed for pread/pwrite() fallback */
+    s->tmp_buf = av_malloc(s->block_size);
+    if (!s->tmp_buf) {
+        ret = AVERROR(ENOMEM);
+        goto fail;
     }
 
     h->max_packet_size = s->block_size;

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

Reply via email to