summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-10-06 04:28:59 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-10-06 04:48:00 +0300
commit7fd3eb0f74e7986e07556077ed654bad7869add8 (patch)
tree8d293145c0ef2bc31ca63f79dccb4e3b57294c82
parentef438b3a6b5bc714d521dd46d3ccb798ecd31eed (diff)
parentcbbc886820e981f488660708678f528e1d243121 (diff)
downloadmpv-7fd3eb0f74e7986e07556077ed654bad7869add8.tar.bz2
mpv-7fd3eb0f74e7986e07556077ed654bad7869add8.tar.xz
Merge svn changes up to r29752
As part of merging subtitle-in-terminal changes make update_subtitles() only clear existing subtitles if called with the reset argument, and not try to set new ones. Later calls should set the needed new subtitles, and this change avoids some problems with trying to set subtitles when mp_property_sub() in command.c gets called from initialization code before full initialization.
-rw-r--r--Changelog14
-rw-r--r--DOCS/man/en/mplayer.18
-rw-r--r--DOCS/man/zh_CN/mplayer.16
-rw-r--r--cfg-common-opts.h7
-rw-r--r--command.c5
-rwxr-xr-xconfigure90
-rw-r--r--defaultopts.c2
-rw-r--r--etc/codecs.conf29
-rw-r--r--find_sub.c57
-rw-r--r--help/help_mp-bg.h1
-rw-r--r--help/help_mp-cs.h2
-rw-r--r--help/help_mp-de.h2
-rw-r--r--help/help_mp-dk.h1
-rw-r--r--help/help_mp-el.h1
-rw-r--r--help/help_mp-en.h2
-rw-r--r--help/help_mp-es.h2
-rw-r--r--help/help_mp-fr.h1
-rw-r--r--help/help_mp-hu.h2
-rw-r--r--help/help_mp-it.h2
-rw-r--r--help/help_mp-ja.h1
-rw-r--r--help/help_mp-ko.h1
-rw-r--r--help/help_mp-mk.h1
-rw-r--r--help/help_mp-nl.h1
-rw-r--r--help/help_mp-pl.h1
-rw-r--r--help/help_mp-pt_BR.h1
-rw-r--r--help/help_mp-ru.h2
-rw-r--r--help/help_mp-sk.h1
-rw-r--r--help/help_mp-sv.h1
-rw-r--r--help/help_mp-tr.h2
-rw-r--r--help/help_mp-uk.h1
-rw-r--r--help/help_mp-zh_CN.h2
-rw-r--r--help/help_mp-zh_TW.h2
-rw-r--r--libaf/control.h24
-rw-r--r--libao2/ao_alsa.c5
-rw-r--r--libao2/ao_oss.c13
-rw-r--r--libmpcodecs/ad_ffmpeg.c1
-rw-r--r--libmpcodecs/ad_twin.c2
-rw-r--r--libmpcodecs/ae_lavc.c2
-rw-r--r--libmpcodecs/vd.c7
-rw-r--r--libmpcodecs/vd_ffmpeg.c2
-rw-r--r--libmpcodecs/ve_lavc.c4
-rw-r--r--libmpcodecs/ve_x264.c47
-rw-r--r--libmpdemux/demux_lavf.c5
-rw-r--r--libmpdemux/demux_mkv.c32
-rw-r--r--libmpdemux/demux_ts.c1
-rw-r--r--libmpdemux/mp_taglists.c3
-rw-r--r--libvo/aclib_template.c18
-rw-r--r--libvo/gl_common.c29
-rw-r--r--libvo/osx_common.c2
-rw-r--r--libvo/sub.c4
-rw-r--r--libvo/vo_corevideo.m9
-rw-r--r--libvo/vo_gl.c10
-rw-r--r--libvo/vo_gl2.c4
-rw-r--r--mencoder.c16
-rw-r--r--mp_osd.h1
-rw-r--r--mpcommon.c59
-rw-r--r--mpcommon.h7
-rw-r--r--mplayer.c52
-rw-r--r--subreader.h3
59 files changed, 362 insertions, 251 deletions
diff --git a/Changelog b/Changelog
index 59293eb0f6..c2f7babbd3 100644
--- a/Changelog
+++ b/Changelog
@@ -5,12 +5,22 @@ MPlayer (1.0)
* YUY2 Lossless Codec (YLC0) via binary DLL
* Truemotion RT codec (TR20) via binary DLL
* Nogantech Codec (NTN1 and NTN2) via binary DLL
- * add new FourCCs (m1v1,HDMV), TwoCCs (0xA106,0x6c75), and formats (0x11005354)
- to existing codecs.
+ * add new FourCCs (m1v1)
+ TwoCCs (0xA106,0x6c75,0xAAC0)
+ to existing decoders.
* AMR now handled via opencore decoder
+ * updated Windoes Media Screen Codec (MSS1,MSS2) via binary DLL
+ * h264 decoder (CoreAVC) on Windows only via binary DLL
+ * Kega Game video codec (KGV1) via binary DLL
Demuxers:
* support for TrueHD in BluRay streams in libmpdemux
+ * more BluRay codec support with lavf
+
+ Other:
+ * -nosub option for disabling auto-selected subtitles
+ * support for displaying subs in the term (FIXME)
+ * support for subtitles with audio only files
rc3: "BikeshedCounter" March 27, 2009
Decoders:
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index 749c15e922..30043fb11b 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -2291,6 +2291,10 @@ MPlayer prints the available subtitle IDs when run in verbose (\-v) mode.
If you cannot select one of the subtitles on a DVD, also try \-vobsubid.
.
.TP
+.B \-nosub
+Disables any otherwise auto-selected subtitles (as e.g. the Matroska/mkv demuxer supports).
+.
+.TP
.B \-slang <language code[,language code,...]> (also see \-sid)
Specify a priority list of subtitle languages to use.
Different container formats employ different language codes.
@@ -7263,6 +7267,10 @@ Files named 'shotNNNN.png' will be saved in the working directory,
using the first available number \- no files will be overwritten.
The filter has no overhead when not used and accepts an arbitrary
colorspace, so it is safe to add it to the configuration file.
+Make sure that screenshot is added after all other filters that
+you want to have applied to it.
+E.g. it should be the last filter if you want to have an exact
+screenshot of what you see on the monitor.
.RE
.
.TP
diff --git a/DOCS/man/zh_CN/mplayer.1 b/DOCS/man/zh_CN/mplayer.1
index 6d30e6a112..0bd744ceaa 100644
--- a/DOCS/man/zh_CN/mplayer.1
+++ b/DOCS/man/zh_CN/mplayer.1
@@ -1,4 +1,4 @@
-.\" sync with en/mplayer.1 r29661
+.\" sync with en/mplayer.1 r29731
.\" Encoding: UTF-8
.\" Reminder of hard terms which need better/final solution later:
.\" /capture; playtree in parent list; colorkey; retrace; desync; downmix;
@@ -2182,6 +2182,10 @@ MPlayer 运行在 verbose (\-v) 模式时, 打印可用的字幕标识。
如果你不能选择 DVD 中其中之一的字幕, 也请试试 \-vobsubid。
.
.TP
+.B \-nosub
+禁止所有默认情况下自动选择的字幕(就像比如 Matroska/mkv 流分离器所支持的那样)。
+.
+.TP
.B \-slang <语言代号[,语言代号,...]> (也请参见 \-sid)
指定使用字幕语言的优先级列表。
不同的容器格式使用不同的语言代号。DVDs 使用 ISO 639\-1 的
diff --git a/cfg-common-opts.h b/cfg-common-opts.h
index 053a24b372..df034ac446 100644
--- a/cfg-common-opts.h
+++ b/cfg-common-opts.h
@@ -120,10 +120,11 @@
{"loadidx", &index_file_load, CONF_TYPE_STRING, 0, 0, 0, NULL},
// select audio/video/subtitle stream
- OPT_INTRANGE("aid", audio_id, 0, 0, 8190),
+ OPT_INTRANGE("aid", audio_id, 0, -2, 8190),
{"ausid", &audio_substream_id, CONF_TYPE_INT, 0, 0, 0, NULL},
- OPT_INTRANGE("vid", video_id, 0, 0, 8190),
- OPT_INTRANGE("sid", sub_id, 0, 0, 8190),
+ OPT_INTRANGE("vid", video_id, 0, -2, 8190),
+ OPT_INTRANGE("sid", sub_id, 0, -2, 8190),
+ OPT_FLAG_CONSTANTS("nosub", sub_id, 0, -1, -2),
OPT_FLAG_CONSTANTS("novideo", video_id, 0, -1, -2),
{ "hr-mp3-seek", &hr_mp3_seek, CONF_TYPE_FLAG, 0, 0, 1, NULL },
diff --git a/command.c b/command.c
index f35f3e1a32..9738377dd3 100644
--- a/command.c
+++ b/command.c
@@ -1345,7 +1345,7 @@ static int mp_property_sub(m_option_t *prop, int action, void *arg,
int source = -1, reset_spu = 0;
char *sub_name;
- if (!mpctx->sh_video || global_sub_size <= 0)
+ if (global_sub_size <= 0)
return M_PROPERTY_UNAVAILABLE;
switch (action) {
@@ -1529,7 +1529,8 @@ static int mp_property_sub(m_option_t *prop, int action, void *arg,
d_sub->id = opts->sub_id;
}
#endif
- update_subtitles(mpctx->sh_video, d_sub, 0, 1);
+
+ update_subtitles(mpctx, &mpctx->opts, mpctx->sh_video, 0, 0, d_sub, 1);
return M_PROPERTY_OK;
}
diff --git a/configure b/configure
index e55da52c98..2beae2fafc 100755
--- a/configure
+++ b/configure
@@ -440,6 +440,7 @@ Advanced options:
--enable-armv6 enable ARMv6 (ARM) [autodetect]
--enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
--enable-armvfp enable ARM VFP (ARM) [autodetect]
+ --enable-neon enable NEON (ARM) [autodetect]
--enable-iwmmxt enable iWMMXt (ARM) [autodetect]
--disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
--enable-big-endian force byte order to big-endian [autodetect]
@@ -464,7 +465,7 @@ Use these options if autodetection fails:
--with-gtk-config=PATH path to gtk*-config
--with-sdl-config=PATH path to sdl*-config
--with-dvdnav-config=PATH path to dvdnav-config
- --with-dvdread-config=PATH path to dvdread-config
+ --with-dvdread-config=PATH path to dvdread-config
This configure script is NOT autoconf-based, even though its output is similar.
It will try to autodetect all configuration options. If you --enable an option
@@ -490,6 +491,7 @@ _armv5te=auto
_armv6=auto
_armv6t2=auto
_armvfp=auto
+neon=auto
_iwmmxt=auto
_mtrr=auto
_altivec=auto
@@ -1233,6 +1235,8 @@ for ac_option do
--disable-armv6t2) _armv6t2=no ;;
--enable-armvfp) _armvfp=yes ;;
--disable-armvfp) _armvfp=no ;;
+ --enable-neon) neon=yes ;;
+ --disable-neon) neon=no ;;
--enable-iwmmxt) _iwmmxt=yes ;;
--disable-iwmmxt) _iwmmxt=no ;;
--enable-mmx) _mmx=yes ;;
@@ -1266,6 +1270,9 @@ if test -z "$_target" ; then
case "$system_name" in
Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS)
;;
+ Haiku)
+ system_name=BeOS
+ ;;
IRIX*)
system_name=IRIX
;;
@@ -1306,16 +1313,8 @@ if test -z "$_target" ; then
# x86/x86pc is used by QNX
case "$(uname -m 2>&1)" in
- i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686|BePC) host_arch=i386 ;;
+ x86_64|amd64|i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686|BePC) host_arch=i386 ;;
ia64) host_arch=ia64 ;;
- x86_64|amd64)
- if [ -n "$($_cc -dumpmachine | sed -n '/^x86_64-/p;/^amd64-/p')" -a \
- -z "$(echo $CFLAGS $_cc | grep -- -m32)" ]; then
- host_arch=x86_64
- else
- host_arch=i386
- fi
- ;;
macppc|ppc) host_arch=ppc ;;
ppc64) host_arch=ppc64 ;;
alpha) host_arch=alpha ;;
@@ -1356,14 +1355,6 @@ else # if test -z "$_target"
fi
fi
-echo "Detected operating system: $system_name"
-echo "Detected host architecture: $host_arch"
-
-if test "$_runtime_cpudetection" = yes && ! x86 && ! ppc; then
- die "Runtime CPU detection only works for x86, x86-64 and PPC!"
-fi
-
-
extra_cflags="-I. $extra_cflags"
_timer=timer-linux.c
_getch=getch2.c
@@ -1446,6 +1437,24 @@ echo configuration: $_configuration > "$TMPLOG"
echo >> "$TMPLOG"
+if test -z "$_target" && x86 ; then
+ cat > $TMPC << EOF
+int main(void) {
+ int test[sizeof(char *)-7];
+ return 0;
+}
+EOF
+ cc_check && host_arch=x86_64 || host_arch=i386
+fi
+
+echo "Detected operating system: $system_name"
+echo "Detected host architecture: $host_arch"
+
+if test "$_runtime_cpudetection" = yes && ! x86 && ! ppc; then
+ die "Runtime CPU detection only works for x86, x86-64 and PPC!"
+fi
+
+
# Checking CC version...
# Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
if test "$(basename $_cc)" = "icc" || test "$(basename $_cc)" = "ecc"; then
@@ -2297,6 +2306,7 @@ EOF
cc_check -c || die "Symbol mangling check failed."
sym=$($_nm -P -g $TMPEXE)
extern_prefix=${sym%%ff_extern*}
+def_extern_asm="#define EXTERN_ASM $extern_prefix"
def_extern_prefix="#define EXTERN_PREFIX \"$extern_prefix\""
echores $extern_prefix
@@ -2467,6 +2477,26 @@ EOF
cc_check && ten_operands=yes && def_ten_operands='#define HAVE_TEN_OPERANDS 1'
echores $ten_operands
+echocheck "ebx availability"
+ebx_available=no
+def_ebx_available='#define HAVE_EBX_AVAILABLE 0'
+cat > $TMPC << EOF
+int main(void) {
+ int x;
+ __asm__ volatile(
+ "xor %0, %0"
+ :"=b"(x)
+ // just adding ebx to clobber list seems unreliable with some
+ // compilers, e.g. Haiku's gcc 2.95
+ );
+ // and the above check does not work for OSX 64 bit...
+ __asm__ volatile("":::"%ebx");
+ return 0;
+}
+EOF
+cc_check && ebx_available=yes && def_ebx_available='#define HAVE_EBX_AVAILABLE 1'
+echores $ebx_available
+
echocheck "yasm"
if test -z "$YASMFLAGS" ; then
if darwin ; then
@@ -2623,6 +2653,16 @@ EOF
fi
echores "$_armvfp"
+ echocheck "ARM NEON"
+ if test $neon = "auto" ; then
+ cat > $TMPC << EOF
+int main(void) { __asm__ volatile ("vadd.i16 q0, q0, q0"); return 0; }
+EOF
+ neon=no
+ cc_check && neon=yes
+ fi
+ echores "$neon"
+
echocheck "iWMMXt (Intel XScale SIMD instructions)"
if test $_iwmmxt = "auto" ; then
cat > $TMPC << EOF
@@ -2634,7 +2674,7 @@ EOF
echores "$_iwmmxt"
fi
-_cpuexts_all='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP IWMMXT MMI VIS MVI'
+_cpuexts_all='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP NEON IWMMXT MMI VIS MVI'
test "$_altivec" = yes && _cpuexts="ALTIVEC $_cpuexts"
test "$_mmx" = yes && _cpuexts="MMX $_cpuexts"
test "$_mmxext" = yes && _cpuexts="MMX2 $_cpuexts"
@@ -2650,6 +2690,7 @@ test "$_armv5te" = yes && _cpuexts="ARMV5TE $_cpuexts"
test "$_armv6" = yes && _cpuexts="ARMV6 $_cpuexts"
test "$_armv6t2" = yes && _cpuexts="ARMV6T2 $_cpuexts"
test "$_armvfp" = yes && _cpuexts="ARMVFP $_cpuexts"
+test "$neon" = yes && _cpuexts="NEON $_cpuexts"
test "$_iwmmxt" = yes && _cpuexts="IWMMXT $_cpuexts"
test "$_vis" = yes && _cpuexts="VIS $_cpuexts"
test "$_mvi" = yes && _cpuexts="MVI $_cpuexts"
@@ -6347,7 +6388,7 @@ echores "$_theora"
echocheck "internal mp3lib support"
if test "$_mp3lib" = auto ; then
- test "$cc_vendor" = intel && _mp3lib=no || _mp3lib=yes
+ test "$cc_vendor" = intel && test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _mp3lib=no || _mp3lib=yes
fi
if test "$_mp3lib" = yes ; then
def_mp3lib='#define CONFIG_MP3LIB 1'
@@ -6360,7 +6401,7 @@ echores "$_mp3lib"
echocheck "liba52 support"
if test "$_liba52_internal" = auto ; then
- test "$cc_vendor" = intel && _liba52_internal=no || _liba52_internal=yes
+ test "$cc_vendor" = intel && test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _liba52_internal=no || _liba52_internal=yes
fi
def_liba52='#undef CONFIG_LIBA52'
def_liba52_internal="#undef CONFIG_LIBA52_INTERNAL"
@@ -6945,8 +6986,8 @@ if test "$_x264" = auto ; then
cat > $TMPC << EOF
#include <inttypes.h>
#include <x264.h>
-#if X264_BUILD < 65
-#error We do not support old versions of x264. Get the latest from SVN.
+#if X264_BUILD < 76
+#error We do not support old versions of x264. Get the latest from git.
#endif
int main(void) { x264_encoder_open((void*)0); return 0; }
EOF
@@ -8097,6 +8138,7 @@ $def_vsscanf
$def_asmalign_pot
$def_builtin_expect
$def_dl
+$def_extern_asm
$def_extern_prefix
$def_iconv
$def_kstat
@@ -8404,7 +8446,7 @@ $def_yasm
#define CONFIG_RDFT 1
/* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
-#define HAVE_EBX_AVAILABLE 1
+$def_ebx_available
#ifndef MP_DEBUG
#define HAVE_EBP_AVAILABLE 1
#else
diff --git a/defaultopts.c b/defaultopts.c
index d908eda347..2bd6f7e3e3 100644
--- a/defaultopts.c
+++ b/defaultopts.c
@@ -26,7 +26,7 @@ void set_default_mplayer_options(struct MPOpts *opts)
.doubleclick_time = 300,
.audio_id = -1,
.video_id = -1,
- .sub_id = -2,
+ .sub_id = -1,
.playback_speed = 1.,
.movie_aspect = -1.,
.flip = -1,
diff --git a/etc/codecs.conf b/etc/codecs.conf
index 782ff61809..84660fc82f 100644
--- a/etc/codecs.conf
+++ b/etc/codecs.conf
@@ -899,6 +899,22 @@ videocodec ffh264vdpau
dll h264_vdpau
out VDPAU_H264
+videocodec coreavcwindows
+ info "CoreAVC H.264 for x86 - http://corecodec.org/"
+ comment "this codec will only work after purchasing it"
+ status working
+ fourcc H264,h264
+ fourcc X264,x264
+ fourcc avc1 AVC1,AVC1
+ fourcc davc,DAVC
+ fourcc VSSH
+ format 0x10000005
+ driver dshow
+ dll "CoreAVCDecoder.ax"
+ guid 0x09571a4b, 0xf1fe, 0x4c60, 0x97, 0x60, 0xde, 0x6d, 0x31, 0x0c, 0x7c, 0x31
+ out YV12,IYUV,I420,YUY2
+
+
videocodec ffsvq3
info "FFmpeg Sorenson Video v3 (SVQ3)"
status working
@@ -1148,6 +1164,16 @@ videocodec wmsdmod
guid 0x7bafb3b1, 0xd8f4, 0x4279, 0x92, 0x53, 0x27, 0xda, 0x42, 0x31, 0x08, 0xde
out BGR32,BGR24,BGR16
+videocodec wms10dmod
+ info "Windows Media Screen Codec 2 from WMP10"
+ status working
+ fourcc MSS1
+ fourcc MSS2
+ driver dmo
+ dll "wms10dmod.dll"
+ guid 0x7bafb3b1, 0xd8f4, 0x4279, 0x92, 0x53, 0x27, 0xda, 0x42, 0x31, 0x08, 0xde
+ out BGR32,BGR24,BGR16
+
videocodec gotomeeting
info "GoToMeeting codec"
status working
@@ -3499,10 +3525,12 @@ audiocodec faad
fourcc "VLB " ; Used in NSV, not really working
fourcc "AAC " ; Used in NSV
fourcc "AACP" ; Used in NSV for AACPlus
+ fourcc raac,racp
format 0xff
format 0x706D
format 0x4143 ; aac in asf
format 0xA106 ; aac in avi
+ format 0xAAC0 ; Borgtech nonsense tag
driver faad
dll libfaad2
@@ -3518,6 +3546,7 @@ audiocodec ffaac
format 0x706D
format 0x4143 ; aac in asf
format 0xA106 ; aac in avi not yet working
+ format 0xAAC0 ; Borgtech nonsense tag
driver ffmpeg
dll aac
diff --git a/find_sub.c b/find_sub.c
index 07d91d7e55..dcd4c4cd77 100644
--- a/find_sub.c
+++ b/find_sub.c
@@ -12,6 +12,7 @@
#include "mp_msg.h"
#include "help_mp.h"
+#include "mpcommon.h"
static int current_sub=0;
@@ -52,8 +53,9 @@ void step_sub(sub_data *subd, float pts, int movement) {
sub_delay = subs[current_sub].start / (subd->sub_uses_time ? 100 : sub_fps) - pts;
}
-void find_sub(sub_data* subd,int key){
+void find_sub(struct MPContext *mpctx, sub_data* subd,int key){
subtitle *subs;
+ subtitle *new_sub = NULL;
int i,j;
if ( !subd || subd->sub_num == 0) return;
@@ -77,8 +79,8 @@ void find_sub(sub_data* subd,int key){
vo_osd_changed(OSDTYPE_SUBTITLE);
if(key<=0){
- vo_sub=NULL; // no sub here
- return;
+ // no sub here
+ goto update;
}
// printf("\r---- sub changed ----\n");
@@ -89,13 +91,12 @@ void find_sub(sub_data* subd,int key){
// no sub
nosub_range_start=subs[current_sub].end;
nosub_range_end=subs[current_sub+1].start;
- vo_sub=NULL;
- return;
+ goto update;
}
// next sub?
++current_sub;
- vo_sub=&subs[current_sub];
- if(key>=vo_sub->start && key<=vo_sub->end) return; // OK!
+ new_sub=&subs[current_sub];
+ if(key>=new_sub->start && key<=new_sub->end) goto update; // OK!
}
// printf("\r---- sub log search... ----\n");
@@ -106,22 +107,22 @@ void find_sub(sub_data* subd,int key){
// printf("Searching %d in %d..%d\n",key,subs[i].start,subs[j].end);
while(j>=i){
current_sub=(i+j+1)/2;
- vo_sub=&subs[current_sub];
- if(key<vo_sub->start) j=current_sub-1;
- else if(key>vo_sub->end) i=current_sub+1;
- else return; // found!
+ new_sub=&subs[current_sub];
+ if(key<new_sub->start) j=current_sub-1;
+ else if(key>new_sub->end) i=current_sub+1;
+ else goto update; // found!
}
-// if(key>=vo_sub->start && key<=vo_sub->end) return; // OK!
+// if(key>=new_sub->start && key<=new_sub->end) return; // OK!
// check where are we...
- if(key<vo_sub->start){
+ if(key<new_sub->start){
if(current_sub<=0){
// before the first sub
nosub_range_start=key-1; // tricky
- nosub_range_end=vo_sub->start;
-// printf("FIRST... key=%d end=%d \n",key,vo_sub->start);
- vo_sub=NULL;
- return;
+ nosub_range_end=new_sub->start;
+// printf("FIRST... key=%d end=%d \n",key,new_sub->start);
+ new_sub=NULL;
+ goto update;
}
--current_sub;
if(key>subs[current_sub].end && key<subs[current_sub+1].start){
@@ -129,31 +130,33 @@ void find_sub(sub_data* subd,int key){
nosub_range_start=subs[current_sub].end;
nosub_range_end=subs[current_sub+1].start;
// printf("No sub... 1 \n");
- vo_sub=NULL;
- return;
+ new_sub=NULL;
+ goto update;
}
printf("HEH???? ");
} else {
- if(key<=vo_sub->end) printf("JAJJ! "); else
+ if(key<=new_sub->end) printf("JAJJ! "); else
if(current_sub+1 >= subd->sub_num){
// at the end?
- nosub_range_start=vo_sub->end;
+ nosub_range_start=new_sub->end;
nosub_range_end=0x7FFFFFFF; // MAXINT
// printf("END!?\n");
- vo_sub=NULL;
- return;
+ new_sub=NULL;
+ goto update;
} else
if(key>subs[current_sub].end && key<subs[current_sub+1].start){
// no sub
nosub_range_start=subs[current_sub].end;
nosub_range_end=subs[current_sub+1].start;
// printf("No sub... 2 \n");
- vo_sub=NULL;
- return;
+ new_sub=NULL;
+ goto update;
}
}
- mp_msg(MSGT_FIXME,MSGL_FIXME,"SUB ERROR: %d ? %d --- %d [%d] \n",key,(int)vo_sub->start,(int)vo_sub->end,current_sub);
+ mp_msg(MSGT_FIXME,MSGL_FIXME,"SUB ERROR: %d ? %d --- %d [%d] \n",key,(int)new_sub->start,(int)new_sub->end,current_sub);
- vo_sub=NULL; // no sub here
+ new_sub=NULL; // no sub here
+update:
+ set_osd_subtitle(mpctx, new_sub);
}
diff --git a/help/help_mp-bg.h b/help/help_mp-bg.h
index a74732cc63..bf8608360d 100644
--- a/help/help_mp-bg.h
+++ b/help/help_mp-bg.h
@@ -546,7 +546,6 @@ static const char help_text[]=
// vd.c
#define MSGTR_CodecDidNotSet "VDec: Кодекът не е указал sh->disp_w и sh->disp_h, опит за решение.\n"
-#define MSGTR_VoConfigRequest "VDec: заявка на vo config - %d x %d (preferred csp: %s)\n"
#define MSGTR_CouldNotFindColorspace "Не е открит подходящ цветови формат - повторен опит с -vf scale...\n"
#define MSGTR_MovieAspectIsSet "Пропорциите на филма са %.2f:1 - мащабиране до правилните пропорции .\n"
#define MSGTR_MovieAspectUndefined "Не са дефинирани пропорции - без предварително мащабиране.\n"
diff --git a/help/help_mp-cs.h b/help/help_mp-cs.h
index 716200e25e..aa39e02a47 100644
--- a/help/help_mp-cs.h
+++ b/help/help_mp-cs.h
@@ -1631,8 +1631,6 @@ static const char help_text[]=
// vd.c
#define MSGTR_CodecDidNotSet "VDek: Kodek nenastavil sh->disp_w a sh->disp_h, pokouším se to obejít.\n"
-#define MSGTR_VoConfigRequest "VDek: Požadovaná konfigurace vo - %d x %d (preferovaný barevný prostor: %s)\n"
-#define MSGTR_UsingXAsOutputCspNoY "VDek: používám %s jako výstupní csp (ne %d)\n"
#define MSGTR_CouldNotFindColorspace "Nemohu nalézt společný barevný