]> git.sesse.net Git - vlc/commitdiff
* pass the orignal movie size from es_format_t to subpicture_t
authorDerk-Jan Hartman <hartman@videolan.org>
Tue, 21 Sep 2004 19:26:10 +0000 (19:26 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Tue, 21 Sep 2004 19:26:10 +0000 (19:26 +0000)
include/vlc_video.h
modules/codec/spudec/parse.c

index 2ecf6532e48b0711c03669a890c3a10844b9d0ea..7e61002a1ab5e52ac320dbef9239c726142084db 100644 (file)
@@ -253,12 +253,14 @@ struct subpicture_t
      * changed by the video output thread, or simply ignored depending of the
      * subtitle type. */
     /**@{*/
-    int             i_x;                 /**< offset from alignment position */
-    int             i_y;                 /**< offset from alignment position */
-    int             i_width;                              /**< picture width */
-    int             i_height;                            /**< picture height */
-    int             b_absolute;                    /**< position is absolute */
-    int             i_flags;                             /**< position flags */
+    int          i_x;                    /**< offset from alignment position */
+    int          i_y;                    /**< offset from alignment position */
+    int          i_width;                                 /**< picture width */
+    int          i_height;                               /**< picture height */
+    int          i_original_picture_width;  /**< original width of the movie */
+    int          i_original_picture_height;/**< original height of the movie */
+    int          b_absolute;                       /**< position is absolute */
+    int          i_flags;                                /**< position flags */
      /**@}*/
 
     /** Pointer to function that renders this subtitle in a picture */
index 983401d2b033362e4646842e88ed59e0ad360ee9..f626f008838020d7f0b04f6020b6be8951f15e3a 100644 (file)
@@ -90,6 +90,9 @@ subpicture_t * E_(ParsePacket)( decoder_t *p_dec )
     /* Get display time now. If we do it later, we may miss the PTS. */
     p_spu_data->i_pts = p_sys->i_pts;
 
+    p_spu->i_original_picture_width = p_dec->fmt_in.subs.spu.i_original_frame_width;
+    p_spu->i_original_picture_height = p_dec->fmt_in.subs.spu.i_original_frame_height;
+
     /* Getting the control part */
     if( ParseControlSeq( p_dec, p_spu, p_spu_data ) )
     {
@@ -98,7 +101,7 @@ subpicture_t * E_(ParsePacket)( decoder_t *p_dec )
         return NULL;
     }
 
-     /* We try to display it */
+    /* We try to display it */
     if( ParseRLE( p_dec, p_spu, p_spu_data ) )
     {
         /* There was a parse error, delete the subpicture */