33383c2b01
pkgsrc changes: * Various misc fixes (thanks to pkglint) * Do not pass --with-dvdread-config and --with-dvdnav-config, the dvdread-config and dvdnav-config seems that no longer exist. * Avoid to pass --enable-libvorbis otherwise libvorbis can not be recognised by the mplayer configure script. * (re)Use patches from multimedia/ffmpeg2 instead of using mplayer-specific ones Changes: 1.2: "FrameCounter" Decoders: * Hardware accelerated decoding on OS X via VDA. * Internal libmpeg2 disabled by default, on the assumption that nobody really needs it anymore. Other: * "run" slave/keybinding command now supports expanding properties * better support for > 8 bit formats in -vo gl * support for XYZ color space in -vo gl * -vo gl now supports OSD (not EOSD though) with GLES backend. * GLES backend now uses GLES v2 with YUV support via shaders * -vo gl supports rotated display without needing video filters via -monitor-orientation command-line option. * -vo gl now has an OSX/Cocoa backend, so it should be a better alternative to -vo corevideo now. * -vo gl2 renamed to -vo gl_tiled to stop people from assuming it is better than -vo gl (it is in many ways worse). * Fixes for DVB, teletext and closed-caption based subtitles. * Support teletext and CC subtitles in WTV. * Support binding keys corresponding to non-ASCII characters. * Limited -endpos support for -dump* * Danish messages header file renamed from help_mp-dk.h to help_mp-da.h in order to comply with ISO 639 language code (configure language options will now require da instead of dk) * configure: options --enable-gtk1, --with-glib-config= and --with-gtk-config= removed * Change ID3 genre name for genre ID 67 from "Psychadelic" to "Psychedelic" * support for audio bin/cue images Ports: * Windows: support file names as UTF-8 in slave mode and passing file names as wchar command line arguments. * Android: MPlayer can be run from adb shell and display videos via OpenGL ES. Note that just a bit of seeking etc. would cause reproducible system reboots after just a few seconds on my Galaxy S2. * Android: -wid is supported. This should allow using MPlayer in slave mode, a native window pointer needs to be passed as -wid. Untested. GUI: * Support for TV/DVB * Various improvements of the context menu and the preferences dialog * Revision of the user interface texts * Console message with information on deprecated (but still supported) entries in the skin configuration file * New symbol character (r) and new dynamic label variables ($D, $U, $P) * New items (pimage, rpotmeter) * Updated skins (avifile, Blue, Blue-small, Clearlooks, Corelian, disappearer, mentalic, mplayer_red, nativeRed, neutron, phony, plastic, slim, softgrip, standard, trium, tvisor, xanim) * Video can be rotated * New GUI message: evSetRotation * GUI now officially needs GTK+ and GLib versions 2 (it hadn't compiled with versions 1 for quite some time) * Support for audio and video bin/cue image playback * Support for Audio CD / (Super) Video CD / DVD image and DVD copy playback through the respective scheme (cd://, vcd://, dvd://) * Support for arbitrary non-binary data file cue sheets (i.e. cue sheets describing playlists for data files containing multiple titles) FFmpeg: * Version 2.8 with local patches Thanks to wiz@ for misc private discussion.
69 lines
2 KiB
C
69 lines
2 KiB
C
$NetBSD: patch-sub_subreader.c,v 1.3 2015/11/21 09:47:23 leot Exp $
|
|
|
|
Call isspace(3) with unsigned char, instead of char, to handle
|
|
non-ASCII characters properly.
|
|
|
|
--- sub/subreader.c.orig 2014-05-27 19:22:12.000000000 +0000
|
|
+++ sub/subreader.c
|
|
@@ -96,10 +96,10 @@ static int eol(char p) {
|
|
/* Remove leading and trailing space */
|
|
static void trail_space(char *s) {
|
|
int i = 0;
|
|
- while (isspace(s[i])) ++i;
|
|
+ while (isspace((unsigned char)s[i])) ++i;
|
|
if (i) strcpy(s, s + i);
|
|
i = strlen(s) - 1;
|
|
- while (i > 0 && isspace(s[i])) s[i--] = '\0';
|
|
+ while (i > 0 && isspace((unsigned char)s[i])) s[i--] = '\0';
|
|
}
|
|
|
|
static char *stristr(const char *haystack, const char *needle) {
|
|
@@ -785,7 +785,7 @@ static subtitle *sub_read_line_pjs(strea
|
|
if (!stream_read_line (st, line, LINE_LEN, utf16))
|
|
return NULL;
|
|
/* skip spaces */
|
|
- for (s=line; *s && isspace(*s); s++);
|
|
+ for (s=line; *s && isspace((unsigned char)*s); s++);
|
|
/* allow empty lines at the end of the file */
|
|
if (*s==0)
|
|
return NULL;
|
|
@@ -838,7 +838,7 @@ static subtitle *sub_read_line_mpsub(str
|
|
else return current;
|
|
}
|
|
p=line;
|
|
- while (isspace(*p)) p++;
|
|
+ while (isspace((unsigned char)*p)) p++;
|
|
if (eol(*p) && num > 0) return current;
|
|
if (eol(*p)) return NULL;
|
|
|
|
@@ -1877,18 +1877,18 @@ char * strreplace( char * in,char * what
|
|
static void strcpy_trim(char *d, const char *s)
|
|
{
|
|
// skip leading whitespace
|
|
- while (*s && isspace(*s)) {
|
|
+ while (*s && isspace((unsigned char)*s)) {
|
|
s++;
|
|
}
|
|
for (;;) {
|
|
// copy word
|
|
- while (*s && !isspace(*s)) {
|
|
+ while (*s && !isspace((unsigned char)*s)) {
|
|
*d = tolower(*s);
|
|
s++; d++;
|
|
}
|
|
if (*s == 0) break;
|
|
// trim excess whitespace
|
|
- while (*s && isspace(*s)) {
|
|
+ while (*s && isspace((unsigned char)*s)) {
|
|
s++;
|
|
}
|
|
if (*s == 0) break;
|
|
@@ -1932,7 +1932,7 @@ static void strcpy_get_ext(char *d, cons
|
|
static int whiteonly(const char *s)
|
|
{
|
|
while (*s) {
|
|
- if (!isspace(*s)) return 0;
|
|
+ if (!isspace((unsigned char)*s)) return 0;
|
|
s++;
|
|
}
|
|
return 1;
|