[MPlayer-cvslog] r31917 - trunk/mpcommon.c

reimar subversion at mplayerhq.hu
Tue Aug 3 19:09:16 CEST 2010


Author: reimar
Date: Tue Aug  3 19:09:16 2010
New Revision: 31917

Log:
Move initialization of vo_spudec further behind to avoid issues with
PGS subtitles being scaled incorrectly.

Modified:
   trunk/mpcommon.c

Modified: trunk/mpcommon.c
==============================================================================
--- trunk/mpcommon.c	Tue Aug  3 19:01:13 2010	(r31916)
+++ trunk/mpcommon.c	Tue Aug  3 19:09:16 2010	(r31917)
@@ -133,8 +133,6 @@ void update_subtitles(sh_video_t *sh_vid
     if (vo_config_count &&
         (vobsub_id >= 0 || type == 'v')) {
         int timestamp;
-        if (!vo_spudec)
-            vo_spudec = spudec_new(NULL);
         current_module = "spudec";
         /* Get a sub packet from the DVD or a vobsub */
         while(1) {
@@ -167,6 +165,12 @@ void update_subtitles(sh_video_t *sh_vid
                 }
             }
             if (len<=0 || !packet) break;
+            // create it only here, since with some broken demuxers we might
+            // type = v but no DVD sub and we currently do not change the
+            // "original frame size" ever after init, leading to wrong-sized
+            // PGS subtitles.
+            if (!vo_spudec)
+                vo_spudec = spudec_new(NULL);
             if (vo_vobsub || timestamp >= 0)
                 spudec_assemble(vo_spudec, packet, len, timestamp);
         }


More information about the MPlayer-cvslog mailing list