[MPlayer-cvslog] r37778 - trunk/libmpdemux/demuxer.c

reimar subversion at mplayerhq.hu
Sat Feb 20 17:08:40 CET 2016


Author: reimar
Date: Sat Feb 20 17:08:39 2016
New Revision: 37778

Log:
demuxer: fall back to audio pts if all others are unavailable.

Fixes issue #1928.

Modified:
   trunk/libmpdemux/demuxer.c

Modified: trunk/libmpdemux/demuxer.c
==============================================================================
--- trunk/libmpdemux/demuxer.c	Sat Feb 20 14:30:50 2016	(r37777)
+++ trunk/libmpdemux/demuxer.c	Sat Feb 20 17:08:39 2016	(r37778)
@@ -1524,10 +1524,13 @@ double demuxer_get_current_time(demuxer_
 {
     double get_time_ans = 0;
     sh_video_t *sh_video = demuxer->video->sh;
+    sh_audio_t *sh_audio = demuxer->audio->sh;
     if (demuxer->stream_pts != MP_NOPTS_VALUE)
         get_time_ans = demuxer->stream_pts;
-    else if (sh_video)
+    else if (sh_video && sh_video->pts != MP_NOPTS_VALUE)
         get_time_ans = sh_video->pts;
+    else if (sh_audio && sh_audio->pts != MP_NOPTS_VALUE)
+        get_time_ans = sh_audio->pts;
     return get_time_ans;
 }
 


More information about the MPlayer-cvslog mailing list