Commit 3677caf8 authored by Jean-Paul Saman's avatar Jean-Paul Saman

access/alsa.c: Silence overrun messages and add notify vlc core of timestamp

Silence overrun messages and add notify vlc core of timestamp.
parent 4fca6a51
...@@ -442,7 +442,6 @@ static int Demux( demux_t *p_demux ) ...@@ -442,7 +442,6 @@ static int Demux( demux_t *p_demux )
if( !p_block ) break; if( !p_block ) break;
mtime_t i_pts = p_block->i_pts; mtime_t i_pts = p_block->i_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 ); es_out_Send( p_demux->out, p_sys->p_es, p_block );
p_block = NULL; p_block = NULL;
...@@ -467,6 +466,7 @@ static void *AudioThread( vlc_object_t *p_this ) ...@@ -467,6 +466,7 @@ static void *AudioThread( vlc_object_t *p_this )
p_block = GrabAudio( p_demux ); p_block = GrabAudio( p_demux );
if( p_block ) if( p_block )
{ {
es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
block_FifoPut( p_sys->p_grab->p_fifo, p_block ); block_FifoPut( p_sys->p_grab->p_fifo, p_block );
p_block = NULL; p_block = NULL;
} }
...@@ -555,8 +555,10 @@ static block_t* GrabAudio( demux_t *p_demux ) ...@@ -555,8 +555,10 @@ static block_t* GrabAudio( demux_t *p_demux )
/* Test for overrun */ /* Test for overrun */
if( i_correction_delta > p_sys->i_max_frame_size ) if( i_correction_delta > p_sys->i_max_frame_size )
{ {
#if 0
msg_Warn( p_demux, "ALSA read overrun (%zu > %zu)", msg_Warn( p_demux, "ALSA read overrun (%zu > %zu)",
i_correction_delta, p_sys->i_max_frame_size ); i_correction_delta, p_sys->i_max_frame_size );
#endif
i_correction_delta = p_sys->i_max_frame_size; i_correction_delta = p_sys->i_max_frame_size;
snd_pcm_prepare( p_sys->p_alsa_pcm ); snd_pcm_prepare( p_sys->p_alsa_pcm );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment