[MPlayer-cvslog] r37963 - trunk/mplayer.c

ib subversion at mplayerhq.hu
Tue Sep 26 12:33:23 EEST 2017


Author: ib
Date: Tue Sep 26 12:33:22 2017
New Revision: 37963

Log:
Avoid nonsensical elapsed time.

Audio files may contain a cover image and the demuxer may enable it.

If there are no presentation time stamps for the image, retrieve this
information from the audio stream.

Modified:
   trunk/mplayer.c

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Mon Sep 25 00:10:06 2017	(r37962)
+++ trunk/mplayer.c	Tue Sep 26 12:33:22 2017	(r37963)
@@ -4050,9 +4050,10 @@ goto_enable_cache:
                 } else {
                     guiInfo.Position = demuxer_get_percent_pos(mpctx->demuxer);
                 }
+                guiInfo.ElapsedTime = -1;
                 if (mpctx->sh_video)
                     guiInfo.ElapsedTime = mpctx->sh_video->pts;
-                else if (mpctx->sh_audio)
+                if (guiInfo.ElapsedTime < 0 && mpctx->sh_audio)
                     guiInfo.ElapsedTime = playing_audio_pts(mpctx->sh_audio, mpctx->d_audio, mpctx->audio_out);
                 guiInfo.RunningTime = demuxer_get_time_length(mpctx->demuxer);
                 gui(GUI_SET_VOLUME_BALANCE, &mpctx->mixer);


More information about the MPlayer-cvslog mailing list