]> git.sesse.net Git - vlc/blobdiff - modules/stream_out/transcode/osd.c
transcode: default audio bitrate to 96k
[vlc] / modules / stream_out / transcode / osd.c
index b10201f41b84632b9abf1e856af207cce2b3f891..a8950841fc63d652e235f3bad8213361e89e939f 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "transcode.h"
 
-#include <vlc_osd.h>
+#include <vlc_spu.h>
 
 /*
  * OSD menu
@@ -68,7 +68,7 @@ int transcode_osd_new( sout_stream_t *p_stream, sout_stream_id_t *id )
         }
 
         /* open output stream */
-        id->id = sout_StreamIdAdd( p_sys->p_out, &id->p_encoder->fmt_out );
+        id->id = sout_StreamIdAdd( p_stream->p_next, &id->p_encoder->fmt_out );
         id->b_transcode = true;
 
         if( !id->id ) goto error;
@@ -77,17 +77,14 @@ int transcode_osd_new( sout_stream_t *p_stream, sout_stream_id_t *id )
     {
         msg_Dbg( p_stream, "not transcoding a stream (fcc=`%4.4s')",
                  (char*)&id->p_decoder->fmt_out.i_codec );
-        id->id = sout_StreamIdAdd( p_sys->p_out, &id->p_decoder->fmt_out );
+        id->id = sout_StreamIdAdd( p_stream->p_next, &id->p_decoder->fmt_out );
         id->b_transcode = false;
 
         if( !id->id ) goto error;
     }
 
     if( !p_sys->p_spu )
-    {
         p_sys->p_spu = spu_Create( p_stream );
-        spu_Init( p_sys->p_spu );
-    }
 
     return VLC_SUCCESS;
 
@@ -119,7 +116,7 @@ int transcode_osd_process( sout_stream_t *p_stream, sout_stream_id_t *id,
     subpicture_t *p_subpic = NULL;
 
     /* Check if we have a subpicture to send */
-    if( p_sys->p_spu && in->i_dts > 0)
+    if( p_sys->p_spu && in->i_dts > VLC_TS_INVALID )
     {
         p_subpic = spu_SortSubpictures( p_sys->p_spu, in->i_dts, false );
     }
@@ -127,10 +124,7 @@ int transcode_osd_process( sout_stream_t *p_stream, sout_stream_id_t *id,
     {
         msg_Warn( p_stream, "spu channel not initialized, doing it now" );
         if( !p_sys->p_spu )
-        {
             p_sys->p_spu = spu_Create( p_stream );
-            spu_Init( p_sys->p_spu );
-        }
     }
 
     if( p_subpic )