[vlc-commits] decoder: don't check picture/block date against preroll if there's no preroll
Steve Lhomme
git at videolan.org
Tue Sep 3 10:12:22 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Aug 27 07:18:32 2019 +0200| [702b53f8de4b594bba96dfe761bcaff18e27290e] | committer: Steve Lhomme
decoder: don't check picture/block date against preroll if there's no preroll
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=702b53f8de4b594bba96dfe761bcaff18e27290e
---
src/input/decoder.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 491f18d05b..eb704ac419 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -977,7 +977,6 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture
{
decoder_t *p_dec = &p_owner->dec;
vout_thread_t *p_vout = p_owner->p_vout;
- bool prerolled;
if( p_picture->date == VLC_TICK_INVALID )
/* FIXME: VLC_TICK_INVALID -- verify video_output */
@@ -988,14 +987,14 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture
}
vlc_mutex_lock( &p_owner->lock );
- if( p_owner->i_preroll_end > p_picture->date )
+ bool prerolled = p_owner->i_preroll_end != (vlc_tick_t)INT64_MIN;
+ if( prerolled && p_owner->i_preroll_end > p_picture->date )
{
vlc_mutex_unlock( &p_owner->lock );
picture_Release( p_picture );
return VLC_SUCCESS;
}
- prerolled = p_owner->i_preroll_end > (vlc_tick_t)INT64_MIN;
p_owner->i_preroll_end = (vlc_tick_t)INT64_MIN;
vlc_mutex_unlock( &p_owner->lock );
@@ -1123,7 +1122,6 @@ static void DecoderQueueThumbnail( decoder_t *p_dec, picture_t *p_pic )
static int DecoderPlayAudio( struct decoder_owner *p_owner, block_t *p_audio )
{
decoder_t *p_dec = &p_owner->dec;
- bool prerolled;
assert( p_audio != NULL );
@@ -1135,14 +1133,14 @@ static int DecoderPlayAudio( struct decoder_owner *p_owner, block_t *p_audio )
}
vlc_mutex_lock( &p_owner->lock );
- if( p_owner->i_preroll_end > p_audio->i_pts )
+ bool prerolled = p_owner->i_preroll_end != (vlc_tick_t)INT64_MIN;
+ if( prerolled && p_owner->i_preroll_end > p_audio->i_pts )
{
vlc_mutex_unlock( &p_owner->lock );
block_Release( p_audio );
return VLC_SUCCESS;
}
- prerolled = p_owner->i_preroll_end > (vlc_tick_t)INT64_MIN;
p_owner->i_preroll_end = (vlc_tick_t)INT64_MIN;
vlc_mutex_unlock( &p_owner->lock );
More information about the vlc-commits
mailing list