mirror of https://github.com/mpv-player/mpv
Fix DEMUXER_CTRL_GET_PERCENT_POS with -novideo
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22465 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4cb645c043
commit
e18c2bd2d6
|
@ -378,8 +378,10 @@ static int demux_avs_control(demuxer_t *demuxer, int cmd, void *arg)
|
|||
}
|
||||
case DEMUXER_CTRL_GET_PERCENT_POS:
|
||||
{
|
||||
if (!AVS->video_info->num_frames) return DEMUXER_CTRL_DONTKNOW;
|
||||
if (sh_video)
|
||||
*((int *)arg) = AVS->frameno * 100 / AVS->video_info->num_frames;
|
||||
else
|
||||
*((int *)arg) = AVS->sampleno * 100 / AVS->video_info->num_audio_samples;
|
||||
return DEMUXER_CTRL_OK;
|
||||
}
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue