From f0d787344569a7ee7ff6eb66f7bd071ee39eff35 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Sun, 6 Nov 2022 18:03:27 +0100
Subject: [PATCH] lavf/ass: Allow empty Layer field.

Fixes ticket #9581
---
 libavformat/assdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/assdec.c b/libavformat/assdec.c
index 0915f6fafd..188026dd34 100644
--- a/libavformat/assdec.c
+++ b/libavformat/assdec.c
@@ -57,7 +57,7 @@ static int read_dialogue(ASSContext *ass, AVBPrint *dst, const uint8_t *p,
     int hh1, mm1, ss1, ms1;
     int hh2, mm2, ss2, ms2;
 
-    if (sscanf(p, "Dialogue: %*[^,],%d:%d:%d%*c%d,%d:%d:%d%*c%d,%n",
+    if (sscanf(p, "Dialogue:%*[^,],%d:%d:%d%*c%d,%d:%d:%d%*c%d,%n",
                &hh1, &mm1, &ss1, &ms1,
                &hh2, &mm2, &ss2, &ms2, &pos) >= 8 && pos > 0) {
 
-- 
2.17.1

