[vlc-devel] [PATCH] subtitle: fix AQT subtitle parsing
Steve Lhomme
robux4 at ycbcr.xyz
Mon Jan 18 14:46:59 UTC 2021
The numbers we read are frame numbers. There's a start and stop frame number.
(based on http://web.archive.org/web/20070210095721/http://www.volny.cz/aberka/czech/aqt.html
and libavformat)
---
modules/demux/subtitle.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c
index 968a356a596..f117bda2b76 100644
--- a/modules/demux/subtitle.c
+++ b/modules/demux/subtitle.c
@@ -1599,18 +1599,16 @@ static int ParseAQT(vlc_object_t *p_obj, subs_properties_t *p_props, text_t *txt
/* Data Lines */
if( sscanf (s, "-->> %d", &t) == 1)
{
- p_subtitle->i_start = (int64_t)t; /* * FPS*/
- p_subtitle->i_stop = -1;
-
/* Starting of a subtitle */
if( i_firstline )
{
+ p_subtitle->i_start = t * p_props->i_microsecperframe;
i_firstline = 0;
}
/* We have been too far: end of the subtitle, begin of next */
else
{
- TextPreviousLine( txt );
+ p_subtitle->i_stop = t * p_props->i_microsecperframe;
break;
}
}
--
2.29.2
More information about the vlc-devel
mailing list