[FFmpeg-devel] [PATCH] libavformat/dashdec.c Fix for ticket #7395

2023-12-06 Thread Evgeniy Pantyuhin via ffmpeg-devel
Signed-off-by: Evgeniy 
---
 libavformat/dashdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 29d4680..36e4719 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -768,7 +768,7 @@ static int resolve_content_path(AVFormatContext *s, const 
char *url, int *max_ur
 baseurl = xmlNodeGetContent(node);
 root_url = (av_strcasecmp(baseurl, "")) ? baseurl : path;
 if (node) {
-xmlNodeSetContent(node, root_url);
+xmlNodeSetContent(node, xmlEncodeEntitiesReentrant(NULL, root_url));
 updated = 1;
 }
 
-- 
2.40.0.windows.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [PATCH] libavformat/dashdec.c Fix for ticket #7395

2023-12-07 Thread Evgeniy Pantyuhin via ffmpeg-devel
Hello Anton,

Thursday, December 7, 2023, 8:32:33 PM, you wrote:

>>libavformat/dashdec.c Fix for ticket #7395

> "fix bug" is not a useful commit message


DASH demuxing error "unterminated entity reference" due to ampersand in URL

Commit 7a63da8 broke the DASH demuxer if the manifest contains a BaseURL with 
an ampersand (&) or other characters that need to be escaped in XML.
This is because the method resolve_content_path calls xmlNodeGetContent, which 
unescapes the string, and then passes it back to xmlNodeSetContent, which 
apparently expects an escaped string.
Unfortunately I cannot provide an example MPD, but it should be easy enough to 
manufacture one by simply adding &v=3 or so to the BaseURL in a simple 
manifest.

-- 
Best regards,
 Evgeniymailto:pn...@mail.ru

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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