vlc/vlc-3.0 | branch: master | Steve Lhomme <[email protected]> | Mon Jan 18 
15:36:53 2021 +0100| [4f8ca0de7864775b2b701f97dafd403bc4a86cbd] | committer: 
Steve Lhomme

subtitle: fix AQT subtitle parsing

The numbers we read are frame numbers. There's a start and a stop frame number,
not just the start frame. The stop frame number was discarded so far as the
next start frame.
(based on 
http://web.archive.org/web/20070210095721/http://www.volny.cz/aberka/czech/aqt.html
and libavformat)

(cherry picked from commit 874f6d8115ed68bac202f66e84b5e0e7da544b6d)

Signed-off-by: Steve Lhomme <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=4f8ca0de7864775b2b701f97dafd403bc4a86cbd
---

 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 83ba0726e5..07d8c9d3ab 100644
--- a/modules/demux/subtitle.c
+++ b/modules/demux/subtitle.c
@@ -1619,18 +1619,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;
             }
         }

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to