mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-29 07:06:59 +08:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user