[vlc-devel] [PATCH] Setting b_subtitle on subpictures during transcode, and applying correct timing.

Blake Livingston blake.a.livingston at gmail.com
Wed Jul 21 08:04:22 CEST 2010


>From 6bffb9add9df20610850e9a365246fd3ee968300 Mon Sep 17 00:00:00 2001
From: Blake Livingston <blake.a.livingston at gmail.com>
Date: Tue, 20 Jul 2010 22:42:32 -0700
Subject: [PATCH] Setting b_subtitle on subpictures during transcode, and
applying correct timing.

---
 modules/stream_out/transcode/spu.c   |    4 +++-
 modules/stream_out/transcode/video.c |    3 +--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/stream_out/transcode/spu.c
b/modules/stream_out/transcode/spu.c
index d031d9a..31211d9 100644
--- a/modules/stream_out/transcode/spu.c
+++ b/modules/stream_out/transcode/spu.c
@@ -38,7 +38,9 @@ static subpicture_t *spu_new_buffer( decoder_t *p_dec,
                                      const subpicture_updater_t *p_upd )
 {
     VLC_UNUSED( p_dec );
-    return subpicture_New( p_upd );
+    subpicture_t *p_subpicture = subpicture_New( p_upd );
+    p_subpicture->b_subtitle = true;
+    return p_subpicture;
 }

 static void spu_del_buffer( decoder_t *p_dec, subpicture_t *p_subpic )
diff --git a/modules/stream_out/transcode/video.c
b/modules/stream_out/transcode/video.c
index 8afe2c2..6d4f855 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -716,9 +716,8 @@ int transcode_video_process( sout_stream_t *p_stream,
sout_stream_id_t *id,
             else
                 fmt = id->p_decoder->fmt_out.video;

-            /* FIXME the mdate() seems highly suspicious */
             spu_RenderSubpictures( p_sys->p_spu, p_pic, &fmt,
-                                   p_subpic, &id->p_decoder->fmt_out.video,
mdate() );
+                                   p_subpic, &id->p_decoder->fmt_out.video,
p_pic->date );
         }

         /* Run user specified filter chain */
-- 
1.7.0.4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100720/c44cdb13/attachment.html>


More information about the vlc-devel mailing list