PR #24981 opened by ffmpeg-devel
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24981
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24981.patch

**Backport:** https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24962




>From 0fd03b22140d4ee0b03d4878d4625c61976ad1b0 Mon Sep 17 00:00:00 2001
From: Timo Rothenpieler <[email protected]>
Date: Fri, 9 Oct 2026 02:59:02 +0200
Subject: [PATCH] avformat/imfdec: don't busy-loop if non-Asset in Asset-list

(cherry picked from commit ef305e32e8b159699cc4a76fbddcfb8ff210a8c7)
---
 libavformat/imfdec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c
index bd1135e2e4..81d1f3ed27 100644
--- a/libavformat/imfdec.c
+++ b/libavformat/imfdec.c
@@ -211,7 +211,7 @@ static int parse_imf_asset_map_from_xml_dom(AVFormatContext 
*s,
     asset_map->assets = tmp;
 
     asset_element = xmlFirstElementChild(node);
-    while (asset_element) {
+    for (; asset_element; asset_element = 
xmlNextElementSibling(asset_element)) {
         if (av_strcasecmp(asset_element->name, "Asset") != 0)
             continue;
 
@@ -246,7 +246,6 @@ static int parse_imf_asset_map_from_xml_dom(AVFormatContext 
*s,
         av_log(s, AV_LOG_DEBUG, "Found asset absolute URI: %s\n", 
asset->absolute_uri);
 
         asset_map->asset_count++;
-        asset_element = xmlNextElementSibling(asset_element);
     }
 
     return ret;
-- 
2.52.0

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

Reply via email to