mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
- Backport upstream fix for .mkv playback stutter using oss audio.
- Bump PORTREVISION. PR: ports/186093 Submitted by: "Marko Cupać" <marko.cupac@mimar.rs> (PR) Obtained from: http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c1622c2c6e0e15a38fef723086ca8bf75a75b46b
This commit is contained in:
parent
6a0247ab11
commit
b17d903e24
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=352445
2 changed files with 38 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
PORTNAME= vlc
|
||||
DISTVERSION= 2.1.4
|
||||
PORTREVISION= 1
|
||||
PORTEPOCH= 4
|
||||
CATEGORIES= multimedia audio ipv6 net www
|
||||
MASTER_SITES= http://download.videolan.org/pub/videolan/${PORTNAME}/${DISTVERSION:S/a$//}/ \
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
Backported from:
|
||||
|
||||
http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c1622c2c6e0e15a38fef723086ca8bf75a75b46b
|
||||
|
||||
--- modules/audio_output/oss.c.orig
|
||||
+++ modules/audio_output/oss.c
|
||||
@@ -37,6 +37,7 @@
|
||||
#else
|
||||
# include <sys/soundcard.h>
|
||||
#endif
|
||||
+#include <errno.h>
|
||||
|
||||
#ifndef SNDCTL_DSP_HALT
|
||||
# define SNDCTL_DSP_HALT SNDCTL_DSP_RESET
|
||||
@@ -210,6 +211,22 @@ static int Start (audio_output_t *aout,
|
||||
}
|
||||
aout_FormatPrepare (fmt);
|
||||
|
||||
+ /* Select timing */
|
||||
+ unsigned bytes;
|
||||
+ char buf[1024];
|
||||
+
|
||||
+ if (spdif)
|
||||
+ bytes = AOUT_SPDIF_SIZE;
|
||||
+ else
|
||||
+ bytes = fmt->i_rate / (CLOCK_FREQ / AOUT_MIN_PREPARE_TIME)
|
||||
+ * fmt->i_bytes_per_frame;
|
||||
+
|
||||
+ int frag = (AOUT_MAX_ADVANCE_TIME / AOUT_MIN_PREPARE_TIME) << 16
|
||||
+ | (32 - clz32(bytes - 1));
|
||||
+ if (ioctl (fd, SNDCTL_DSP_SETFRAGMENT, &frag) < 0)
|
||||
+ msg_Err (aout, "cannot set 0x%08x fragment: %s", frag,
|
||||
+ strerror_r(errno, buf, sizeof(buf) - 1));
|
||||
+
|
||||
VolumeSync (aout);
|
||||
sys->starting = true;
|
||||
sys->format = *fmt;
|
Loading…
Add table
Reference in a new issue