]> git.sesse.net Git - vlc/blobdiff - modules/demux/rawaud.c
Use var_Inherit* instead of var_CreateGet*.
[vlc] / modules / demux / rawaud.c
index 2f2bb11c889214e30e1f7921c94b9547c9afcbfe..b5a270b05384cdc403c7e85b02af5f968cc70da7 100644 (file)
@@ -50,7 +50,7 @@ static void Close( vlc_object_t * );
 #define FOURCC_LONGTEXT N_( \
     "FOURCC code of the raw input format. This is a four character string." )
 
-#define LANG_TEXT N_("Forces the audio language.")
+#define LANG_TEXT N_("Forces the audio language")
 #define LANG_LONGTEXT N_("Forces the audio language for the output mux. Three letter ISO639 code. Default is 'eng'. ")
 
 #ifdef WORDS_BIGENDIAN
@@ -201,7 +201,7 @@ static int Open( vlc_object_t * p_this )
 
     /* initialize timing */
     date_Init( &p_sys->pts, p_sys->fmt.audio.i_rate, 1 );
-    date_Set( &p_sys->pts, 1 );
+    date_Set( &p_sys->pts, 0 );
 
     /* calculate 50ms frame size/time */
     p_sys->i_frame_samples = __MAX( p_sys->fmt.audio.i_rate / 20, 1 );
@@ -242,10 +242,13 @@ static int Demux( demux_t *p_demux )
     }
 
     p_block->i_dts =
-    p_block->i_pts = date_Increment( &p_sys->pts, p_sys->i_frame_samples );
+    p_block->i_pts = VLC_TS_0 + date_Get( &p_sys->pts );
 
     es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
     es_out_Send( p_demux->out, p_sys->p_es, p_block );
+
+    date_Increment( &p_sys->pts, p_sys->i_frame_samples );
+
     return 1;
 }