[MPlayer-cvslog] Proposed rollback of r26345

Milan Jurik milan.jurik at xylab.cz
Sat Feb 21 13:14:44 CET 2009


Hi,

finally I had time to investigate why there is broken seek in MPlayer
svn on Solaris Express/OpenSolaris with Sunaudio for many months. After
seek in file (with keyboard or in GUI) MPlayer is not able to continue
in playing, playing hangs. The root cause is in

------------------------------------------------------------------------
r26345 | reimar | 2008-04-07 19:39:41 +0200 (po, 07 dub 2008) | 3 lines
Changed paths:
   M /trunk/libao2/ao_sun.c

reset() should not senselessly close and reopen
the device but instead just call flush_audio()

Index: libao2/ao_sun.c
===================================================================
--- libao2/ao_sun.c	(revision 26344)
+++ libao2/ao_sun.c	(working copy)
@@ -588,29 +588,7 @@
 
 // stop playing and empty buffers (for seeking/pause)
 static void reset(void){
-    audio_info_t info;
-
-    uninit(1);
-    audio_fd=open(audio_dev, O_WRONLY);
-    if(audio_fd<0){
-	mp_msg(MSGT_AO, MSGL_FATAL, MSGTR_AO_SUN_CantReopenReset,
strerror(errno));
-	return;
-    }
-
-    ioctl(audio_fd, AUDIO_DRAIN, 0);
-
-    AUDIO_INITINFO(&info);
-    info.play.encoding = af2sunfmt(ao_data.format);
-    info.play.precision =
-	(ao_data.format==AF_FORMAT_S16_NE 
-	 ? AUDIO_PRECISION_16
-	 : AUDIO_PRECISION_8);
-    info.play.channels = ao_data.channels;
-    info.play.sample_rate = ao_data.samplerate;
-    info.play.samples = 0;
-    info.play.eof = 0;
-    info.play.error = 0;
-    ioctl (audio_fd, AUDIO_SETINFO, &info);
+    flush_audio(audio_fd);
     queued_bursts = 0;
     queued_samples = 0;
 }

My knowledge of mplayer internals is limited so I do not know the
background for this change yet, but I can say that this change is the
problem. With revert of this change even the latest svn is working on
Solaris Express again.

There is already similar report from other user:

http://lists.mplayerhq.hu/pipermail/mplayer-cvslog/2009-February/036369.html

Best regards,

Milan




More information about the MPlayer-cvslog mailing list