[MPlayer-users] mplayer SVN plays video too fast on FreeBSD
Tom Evans
tevans.uk at googlemail.com
Tue Dec 8 10:28:16 CET 2009
On Tue, Dec 8, 2009 at 4:02 AM, RC <cooleyr at gmail.com> wrote:
> On Mon, 7 Dec 2009 14:13:00 +0000
> Tom Evans <tevans.uk at googlemail.com> wrote:
>
>> So, I checked out mplayer trunk, r29977, and made a few changes to
>> support compilation on FreeBSD (see attached diff). The program built
>> and compiled successfully, but every file I play through it has the
>> video processed way too fast.
>
> MPlayer syncs based on audio speed, and ao_oss.c is one of the files
> you've modified... Hmm. I would try with some other -ao device to
> test this, perhaps -ao esd or similar.
>
> afm=hwac3 could similarly be a culprit.
>
Interesting, some things to try tonight. The patch to ao_oss.c is to
set the sample rate after pausing/resuming, which was breaking ac3
passthrough on my sound card. I'll play around with the audio options
some....
On the advice of someone on the freebsd mailing lists, I reduced my
patches to just those that are required to compile, and reduced my
configure arguments closer to the default. It didn't make a
difference, audio is still correct, and video plays too fast.
I am now configuring with:
--extra-cflags="-DBROKEN_RELOCATIONS -I/usr/local/include/freetype"
--enable-freetype --enable-vdpau
and the diff is reduced to:
Index: libao2/ao_oss.c
===================================================================
--- libao2/ao_oss.c (revision 29978)
+++ libao2/ao_oss.c (working copy)
@@ -445,6 +445,7 @@
#if defined(FD_CLOEXEC) && defined(F_SETFD)
fcntl(audio_fd, F_SETFD, FD_CLOEXEC);
#endif
+ ioctl (audio_fd, SNDCTL_DSP_SPEED, &ao_data.samplerate);
oss_format = format2oss(ao_data.format);
if(ao_data.format == AF_FORMAT_AC3)
@@ -457,7 +458,6 @@
int c = ao_data.channels-1;
ioctl (audio_fd, SNDCTL_DSP_STEREO, &c);
}
- ioctl (audio_fd, SNDCTL_DSP_SPEED, &ao_data.samplerate);
}
}
Index: vidix/pci.c
===================================================================
--- vidix/pci.c (revision 29978)
+++ vidix/pci.c (working copy)
@@ -481,7 +481,7 @@
#include "sysdep/pci_arm32.c"
#elif defined(__powerpc__)
#include "sysdep/pci_powerpc.c"
-#elif defined(__x86_64__) || defined(__sh__)
+#elif (defined(__x86_64__) || defined(__sh__)) && !defined(__FreeBSD__)
/* Nothing here right now */
#else
#include "sysdep/pci_x86.c"
Cheers
Tom
More information about the MPlayer-users
mailing list