p_dec = vlc_object_create( p_input, i_object_type );
if( p_dec == NULL )
- {
- msg_Err( p_input, "out of memory" );
return NULL;
- }
p_dec->pf_decode_audio = 0;
p_dec->pf_decode_video = 0;
/* Allocate our private structure for the decoder */
p_dec->p_owner = p_owner = malloc( sizeof( decoder_owner_sys_t ) );
if( p_dec->p_owner == NULL )
- {
- msg_Err( p_dec, "out of memory" );
return NULL;
- }
p_dec->p_owner->b_own_thread = true;
p_dec->p_owner->i_preroll_end = -1;
p_dec->p_owner->p_input = p_input;
/* decoder fifo */
if( ( p_dec->p_owner->p_fifo = block_FifoNew() ) == NULL )
- {
- msg_Err( p_dec, "out of memory" );
return NULL;
- }
/* Set buffers allocation callbacks for the decoders */
p_dec->pf_aout_buffer_new = aout_new_buffer;
vout_thread_t * p_vout = p_dec->p_owner->p_vout;
input_thread_private_t * p_priv = p_input->p;
+ /* Enable with --auto-adjust-pts-delay */
if( !p_priv->pts_adjust.auto_adjust ) return;
for( i = 0; i < I_RENDERPICTURES; i++ )
* This first draft is way to simple, and we can't say if the
* algo will converge. It's also full of constants.
* But this simple algo allows to reduce the latency
- * to the minimum. */
+ * to the minimum.
+ * The whole point of this, is to bypass the pts_delay set
+ * by the access but also the delay arbitraly set by
+ * the remote server.
+ * Actually the remote server's muxer may set up a
+ * pts<->dts delay in the muxed stream. That is
+ * why we may end up in having a negative pts_delay,
+ * to compensate that artificial delay. */
mtime_t buffer_size = youngest_pict->date - oldest_pict->date;
int64_t pts_slide = 0;
if( buffer_size < 10000 )