]> git.sesse.net Git - vlc/blobdiff - src/input/decoder.c
uint is not standard (and breaks Win32) - use unsigned
[vlc] / src / input / decoder.c
index ce171b8c26e902c777803a4b309a0e069617f45d..45e2e784f4c6394a56437c290a754887b4b40ce3 100644 (file)
@@ -445,10 +445,7 @@ static decoder_t * CreateDecoder( input_thread_t *p_input,
 
     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;
@@ -466,10 +463,7 @@ static decoder_t * CreateDecoder( input_thread_t *p_input,
     /* 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;
@@ -484,10 +478,7 @@ static decoder_t * CreateDecoder( input_thread_t *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;
@@ -738,6 +729,7 @@ static void optimize_video_pts( decoder_t *p_dec )
     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++ )
@@ -759,7 +751,14 @@ static void optimize_video_pts( decoder_t *p_dec )
      * 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 )