[MPlayer-cvslog] r37906 - trunk/libmpdemux/demux_audio.c
ib
subversion at mplayerhq.hu
Wed Jan 4 17:30:05 EET 2017
Author: ib
Date: Wed Jan 4 17:30:05 2017
New Revision: 37906
Log:
Enable demuxer_get_percent_pos() for FLAC audio.
DEMUXER_CTRL_GET_PERCENT_POS is returning nonsense after svn r32678,
since priv->next_pts no longer contains any pts value but
MP_NOPTS_VALUE.
Check for MP_NOPTS_VALUE which will allow demuxer_get_percent_pos()
to calculate the position by itself.
Modified:
trunk/libmpdemux/demux_audio.c
Modified: trunk/libmpdemux/demux_audio.c
==============================================================================
--- trunk/libmpdemux/demux_audio.c Tue Nov 15 01:29:59 2016 (r37905)
+++ trunk/libmpdemux/demux_audio.c Wed Jan 4 17:30:05 2017 (r37906)
@@ -831,7 +831,7 @@ static int demux_audio_control(demuxer_t
return DEMUXER_CTRL_GUESS;
case DEMUXER_CTRL_GET_PERCENT_POS:
- if (audio_length<=0)
+ if (audio_length<=0 || priv->next_pts==MP_NOPTS_VALUE)
return DEMUXER_CTRL_DONTKNOW;
*((int *)arg)=(int)( (priv->next_pts*100) / audio_length);
return DEMUXER_CTRL_OK;
More information about the MPlayer-cvslog
mailing list