[vlc-commits] Fixed the format used for subtitles blending when transcoding.

Laurent Aimar git at videolan.org
Tue Jan 10 21:24:27 CET 2012


vlc/vlc-1.2 | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Jan 10 20:50:42 2012 +0100| [7c976039f6a963f1ef975ec8883acb8527b7d371] | committer: Jean-Baptiste Kempf

Fixed the format used for subtitles blending when transcoding.

With [99e262c40f7de62aa4969b1584cce3390f80cc23], it closes #5755 and #5756.
(cherry picked from commit d650147f1ce9b4bb7fd141c1841eb342d1048a5f)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=7c976039f6a963f1ef975ec8883acb8527b7d371
---

 modules/stream_out/transcode/video.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index f18023a..9bb4a5f 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -703,11 +703,14 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_t *id,
         /* Check if we have a subpicture to overlay */
         if( p_sys->p_spu )
         {
-            video_format_t fmt;
-            if( filter_chain_GetLength( id->p_f_chain ) > 0 )
-                fmt = filter_chain_GetFmtOut( id->p_f_chain )->video;
-            else
-                fmt = id->p_decoder->fmt_out.video;
+            video_format_t fmt = id->p_encoder->fmt_in.video;
+            if( fmt.i_visible_width <= 0 || fmt.i_visible_height <= 0 )
+            {
+                fmt.i_visible_width  = fmt.i_width;
+                fmt.i_visible_height = fmt.i_height;
+                fmt.i_x_offset       = 0;
+                fmt.i_y_offset       = 0;
+            }
 
             subpicture_t *p_subpic = spu_Render( p_sys->p_spu, NULL, &fmt, &fmt,
                                                  p_pic->date, p_pic->date, false );



More information about the vlc-commits mailing list