[MPlayer-cvslog] r22465 - trunk/libmpdemux/demux_avs.c

reimar subversion at mplayerhq.hu
Mon Mar 5 13:56:41 CET 2007


Author: reimar
Date: Mon Mar  5 13:56:41 2007
New Revision: 22465

Modified:
   trunk/libmpdemux/demux_avs.c

Log:
Fix DEMUXER_CTRL_GET_PERCENT_POS with -novideo

Modified: trunk/libmpdemux/demux_avs.c
==============================================================================
--- trunk/libmpdemux/demux_avs.c	(original)
+++ trunk/libmpdemux/demux_avs.c	Mon Mar  5 13:56:41 2007
@@ -378,8 +378,10 @@ static int demux_avs_control(demuxer_t *
         }
         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:



More information about the MPlayer-cvslog mailing list