]> git.sesse.net Git - vlc/blobdiff - src/input/decoder.c
input: set OSD message when changing rate via hotkeys to display the current rate...
[vlc] / src / input / decoder.c
index 5a0ef0293ea3bc8b04682eaa0ed443a8c775e827..2dc6404a359524b1874f33f2925861fb4ce683bb 100644 (file)
@@ -369,9 +369,9 @@ void input_DecoderDecode( decoder_t *p_dec, block_t *p_block, bool b_do_pace )
             block_FifoPace( p_owner->p_fifo, 10, SIZE_MAX );
     }
 #ifdef __arm__
-    else if( block_FifoSize( p_owner->p_fifo ) > 50000000 /* 50 MB */ )
+    else if( block_FifoSize( p_owner->p_fifo ) > 50*1024*1024 /* 50 MiB */ )
 #else
-    else if( block_FifoSize( p_owner->p_fifo ) > 400000000 /* 400 MB, ie ~ 50mb/s for 60s */ )
+    else if( block_FifoSize( p_owner->p_fifo ) > 400*1024*1024 /* 400 MiB, ie ~ 50mb/s for 60s */ )
 #endif
     {
         /* FIXME: ideally we would check the time amount of data
@@ -631,9 +631,9 @@ void input_DecoderGetObjects( decoder_t *p_dec,
 
     vlc_mutex_lock( &p_owner->lock );
     if( pp_vout )
-        *pp_vout = vlc_object_hold( p_owner->p_vout );
+        *pp_vout = p_owner->p_vout ? vlc_object_hold( p_owner->p_vout ) : NULL;
     if( pp_aout )
-        *pp_aout = vlc_object_hold( p_owner->p_aout );
+        *pp_aout = p_owner->p_aout ? vlc_object_hold( p_owner->p_aout ) : NULL;
     vlc_mutex_unlock( &p_owner->lock );
 }
 
@@ -1342,6 +1342,7 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,
         vout_DropPicture( p_vout, p_picture );
         return;
     }
+    vout_LinkPicture( p_vout, p_picture );
 
     /* */
     vlc_mutex_lock( &p_owner->lock );
@@ -1421,6 +1422,7 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,
                 p_owner->i_last_rate = i_rate;
             }
             vout_DisplayPicture( p_vout, p_picture );
+            vout_UnlinkPicture( p_vout, p_picture );
         }
         else
         {
@@ -1430,6 +1432,7 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,
                 msg_Warn( p_vout, "non-dated video buffer received" );
 
             *pi_lost_sum += 1;
+            vout_UnlinkPicture( p_vout, p_picture );
             vout_DropPicture( p_vout, p_picture );
         }
         int i_tmp_display;
@@ -1518,7 +1521,7 @@ static void DecoderPlaySpu( decoder_t *p_dec, subpicture_t *p_subpic,
     vout_thread_t *p_vout = p_owner->p_spu_vout;
 
     /* */
-    if( p_subpic->i_start <= VLC_TS_INVALID )
+    if( p_subpic->i_start <= VLC_TS_INVALID && !b_telx )
     {
         msg_Warn( p_dec, "non-dated spu buffer received" );
         subpicture_Delete( p_subpic );
@@ -1683,7 +1686,10 @@ static void DecoderFlushBuffering( decoder_t *p_dec )
         p_owner->buffer.i_count--;
 
         if( p_owner->p_vout )
+        {
+            vout_UnlinkPicture( p_owner->p_vout, p_picture );
             vout_DropPicture( p_owner->p_vout, p_picture );
+        }
 
         if( !p_owner->buffer.p_picture )
             p_owner->buffer.pp_picture_next = &p_owner->buffer.p_picture;