Commit a22458a0 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Merge branch '0.8.6-bugfix' of git@git.videolan.org:vlc into 0.8.6-bugfix

parents 65d362fe b1098282
*~
*.cache
ABOUT-NLS
aclocal.m4
autotools
compile
config.*
configure
intl
libtool
Makefile
Makefile.in
stamp-*
vlc-config
vlc-config.in
$Id$
Changes between 0.8.6e and 0.8.6f:
----------------------------------
Security updates:
* Really fixed subtitle buffer overflow (CVE-2007-6681)
* Fixed Real RTSP code execution problem (CVE-2008-0073)
* Fixed cinepak integer overflow
Various bugfixes:
* The Mozilla plugin registers a usable range of MIME-types on Mac OS X
* Improved VLC's video output behavior on multi-screen setups running Mac OS X
Changes between 0.8.6d and 0.8.6e:
----------------------------------
......
dnl Autoconf settings for vlc
AC_INIT(vlc,0.8.6e)
AC_INIT(vlc,0.8.6f)
VERSION_MAJOR="0"
VERSION_MINOR="8"
VERSION_REVISION="6"
VERSION_EXTRA="e"
VERSION_EXTRA="f"
CONFIGURE_LINE="$0 $*"
CODENAME="Janus"
......
/* Localized versions of Info.plist keys */
CFBundleName = "VLC";
CFBundleShortVersionString = "0.8.6e";
CFBundleGetInfoString = "VLC media player 0.8.6e Copyright (c) 1996-2008 the VideoLAN team";
CFBundleShortVersionString = "0.8.6f";
CFBundleGetInfoString = "VLC media player 0.8.6f Copyright (c) 1996-2008 the VideoLAN team";
NSHumanReadableCopyright = "Copyright (c) 1996-2008 the VideoLAN team";
......@@ -142,7 +142,7 @@
productName = vlc;
productReference = 014CEA410018CDE011CA2923 /* VLC.bundle */;
productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
<plist version=\"1.0\">
<dict>
<key>CFBundleDevelopmentRegion</key>
......@@ -929,7 +929,7 @@
<key>CFBundleExecutable</key>
<string>VLC</string>
<key>CFBundleGetInfoString</key>
<string>VLC media player 0.8.6e, Copyright (c) 1996-2008 the VideoLAN team.</string>
<string>VLC media player 0.8.6f, Copyright (c) 1996-2008 the VideoLAN team.</string>
<key>CFBundleIconFile</key>
<string>vlc.icns</string>
<key>CFBundleIdentifier</key>
......@@ -941,7 +941,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.8.6e</string>
<string>0.8.6f</string>
<key>CFBundleSignature</key>
<string>VLC#</string>
<key>CFBundleURLTypes</key>
......@@ -1008,7 +1008,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>0.8.6e</string>
<string>0.8.6f</string>
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSMainNibFile</key>
......@@ -1097,7 +1097,7 @@
8ED6C27D03E2EB1C0059A3A7 /* intf.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = intf.m; path = ../../modules/gui/macosx/intf.m; sourceTree = SOURCE_ROOT; };
8ED6C27E03E2EB1C0059A3A7 /* macosx.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = macosx.m; path = ../../modules/gui/macosx/macosx.m; sourceTree = SOURCE_ROOT; };
8ED6C27F03E2EB1C0059A3A7 /* misc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = misc.h; path = ../../modules/gui/macosx/misc.h; sourceTree = SOURCE_ROOT; };
8ED6C28003E2EB1C0059A3A7 /* misc.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = misc.m; path = ../../modules/gui/macosx/misc.m; sourceTree = SOURCE_ROOT; };
8ED6C28003E2EB1C0059A3A7 /* misc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = misc.m; path = ../../modules/gui/macosx/misc.m; sourceTree = SOURCE_ROOT; };
8ED6C28103E2EB1C0059A3A7 /* open.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = open.h; path = ../../modules/gui/macosx/open.h; sourceTree = SOURCE_ROOT; };
8ED6C28203E2EB1C0059A3A7 /* open.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = open.m; path = ../../modules/gui/macosx/open.m; sourceTree = SOURCE_ROOT; };
8ED6C28303E2EB1C0059A3A7 /* playlist.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = playlist.h; path = ../../modules/gui/macosx/playlist.h; sourceTree = SOURCE_ROOT; };
......@@ -1451,9 +1451,11 @@
089C1669FE841209C02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = C2F2A6EA09588F1B00018C74 /* Build configuration list for PBXProject "vlc" */;
compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
mainGroup = 089C166AFE841209C02AAC07 /* vlc */;
projectDirPath = "";
projectRoot = "";
targets = (
089C1673FE841209C02AAC07 /* vlc */,
);
......
......@@ -170,3 +170,9 @@ elif svn help >/dev/null 2>&1; then
else
echo "You do not have a subversion client installed." >&2
fi
if git help >/dev/null 2>&1; then
echo "GIT = `which git`" >> config.mak
else
echo "You do not have a Git client in your PATH." >&2
fi
......@@ -1185,33 +1185,54 @@ CLEAN_PKG += libdca
# libx264
# ***************************************************************************
ifdef SVN
x264:
$(SVN) co svn://svn.videolan.org/x264/trunk/ -r 736 x264
x264-$(X264_VERSION).tar.gz:
$(WGET) $(X264_URL)
ifdef GIT
x264:
$(GIT) clone git://git.videolan.org/x264.git
patch -p0 < Patches/x264-svn-info-threads.patch
ifdef HAVE_WIN32
(cd $@; patch -p 0 < ../Patches/x264-svn-win32.patch )
(cd x264; patch -p0 < ../Patches/x264-svn-win32.patch )
endif
ifdef HAVE_DARWIN_OS
(cd $@; patch -p 0 < ../Patches/x264-svn-darwin.patch )
(cd $@; patch -p0 < ../Patches/x264-svn-darwin.patch )
endif
else
x264-$(X264_VERSION).tar.gz:
$(WGET) $(X264_URL)
x264: x264-$(X264_VERSION).tar.gz
$(EXTRACT_GZ)
ifdef HAVE_WIN32
(cd x264;patch -p 0 <../Patches/x264-20050624-win32.patch)
ifndef HAVE_CYGWIN
(cd x264;patch -p0 <../Patches/x264-20050624-win32.patch)
endif
else
patch -p 0 < Patches/x264.patch
patch -p0 < Patches/x264.patch
rm x264/x264.c
endif
endif
ifdef HAVE_WIN32
.x264: x264 .pthreads
ifdef HAVE_CYGWIN
(cd $<; $(HOSTCC) RANLIB="ranlib" AR="ar" STRIP="strip" ./configure $(X264CONF) --prefix="$(PREFIX)" --extra-cflags="-I$(PREFIX)/include" --extra-ldflags="-L$(PREFIX)/lib" && make && make install)
else
(cd $<; $(HOSTCC) ./configure $(X264CONF) --prefix="$(PREFIX)" && make && make install)
endif
else
.x264: x264
(cd $<; ./configure $(X264CONF) --prefix="$(PREFIX)" --enable-pic && make && make install)
(cd $<; $(HOSTCC) ./configure $(X264CONF) --prefix="$(PREFIX)" && make && make install)
endif
touch $@
ifdef SVN
x264-source: x264
tar cfvz x264-$(DATE).tar.gz x264
SOURCE += x264-source
endif
CLEAN_FILE += .x264
CLEAN_PKG += x264
DISTCLEAN_PKG += x264-$(X264_VERSION).tar.gz
......
Index: x264/encoder/encoder.c
===================================================================
--- x264/encoder/encoder.c (revision 736)
+++ x264/encoder/encoder.c (working copy)
@@ -360,6 +360,7 @@
h->param.b_pre_scenecut = 1;
#endif
}
+ x264_log( h, X264_LOG_INFO, "using threads=%d\n", h->param.i_threads );
if( h->param.b_interlaced )
{
Index: configure
===================================================================
--- configure (rvision 547)
+++ configure (copie de travail)
@@ -66,43 +66,142 @@
EXE=""
-UNAMES="`uname -s`"
+AR="ar"
+AROPTS="rc"
+RANLIB="ranlib"
+
+UNAMES="`uname -s |tr A-Z a-z`"
+UNAMEM="`uname -m |tr A-Z a-z`"
+
+# parse options
+
+for opt do
+ optarg="${opt#*=}"
+ case "$opt" in
+ --crosscompile=*)
+ CROSS="$optarg"
+ CC="$CROSS-gcc"
+ AR="$CROSS-ar"
+ RANLIB="$CROSS-ranlib"
+ UNAMES="`echo $CROSS | cut -d- -f2`"
+ UNAMEM="`echo $CROSS | cut -d- -f1`"
+ ;;
+ --prefix=*)
+ prefix="$optarg"
+ ;;
+ --exec-prefix=*)
+ eprefix="$optarg"
+ ;;
+ --bindir=*)
+ bindir="$optarg"
+ ;;
+ --libdir=*)
+ libdir="$optarg"
+ ;;
+ --includedir=*)
+ includedir="$optarg"
+ ;;
+ --enable-avis-input)
+ if [ $SYS = CYGWIN -o $SYS = MINGW ]; then
+ CFLAGS="$CFLAGS -DAVIS_INPUT"
+ LDFLAGS="$LDFLAGS -lvfw32"
+ avis_input="yes"
+ fi
+ ;;
+ --enable-mp4-output)
+ CFLAGS="$CFLAGS -DMP4_OUTPUT"
+ LDFLAGS="$LDFLAGS -lgpac_static"
+ if [ $SYS = CYGWIN -o $SYS = MINGW ]; then
+ LDFLAGS="$LDFLAGS -lwinmm"
+ fi
+ mp4_output="yes"
+ ;;
+ --extra-asflags=*)
+ ASFLAGS="$ASFLAGS ${opt#--extra-asflags=}"
+ ;;
+ --extra-cflags=*)
+ CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
+ VFW_CFLAGS="${opt#--extra-cflags=}"
+ ;;
+ --extra-ldflags=*)
+ LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
+ VFW_LDFLAGS="${opt#--extra-ldflags=}"
+ ;;
+ --enable-pthread)
+ CFLAGS="$CFLAGS -DHAVE_PTHREAD=1"
+ pthread="yes"
+ case $SYS in
+ MINGW|CYGWIN|BEOS)
+ ;;
+ *)
+ LDFLAGS="$LDFLAGS -lpthread"
+ ;;
+ esac
+ ;;
+ --enable-debug)
+ CFLAGS="$CFLAGS -g"
+ debug="yes"
+ ;;
+ --enable-gprof)
+ CFLAGS="$CFLAGS -pg"
+ LDFLAGS="$LDFLAGS -pg"
+ gprof="yes"
+ ;;
+ --enable-pic)
+ CFLAGS="$CFLAGS -fPIC"
+ ASFLAGS="$ASFLAGS -D__PIC__"
+ pic="yes"
+ ;;
+ --enable-vfw)
+ vfw="yes"
+ ;;
+ --enable-visualize)
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
+ CFLAGS="$CFLAGS -DVISUALIZE=1"
+ vis="yes"
+ ;;
+ *)
+ echo "Unknown option $opt, ignored"
+ ;;
+ esac
+done
+
case "$UNAMES" in
- BeOS)
+ beos)
SYS="BEOS"
CFLAGS="$CFLAGS -DHAVE_MALLOC_H"
;;
- Darwin)
+ darwin)
SYS="MACOSX"
CFLAGS="$CFLAGS -falign-loops=16"
LDFLAGS="$LDFLAGS -lm -lmx"
;;
- FreeBSD)
+ freebsd)
SYS="FREEBSD"
LDFLAGS="$LDFLAGS -lm"
;;
- NetBSD)
+ netbsd)
SYS="NETBSD"
LDFLAGS="$LDFLAGS -lm"
;;
- Linux)
+ linux)
SYS="LINUX"
CFLAGS="$CFLAGS -DHAVE_MALLOC_H"
LDFLAGS="$LDFLAGS -lm"
;;
- CYGWIN*)
+ cygwin*)
SYS="CYGWIN"
CFLAGS="$CFLAGS -mno-cygwin"
LDFLAGS="$LDFLAGS -mno-cygwin"
EXE=".exe"
DEVNULL="NUL"
;;
- MINGW*)
+ mingw*)
SYS="MINGW"
EXE=".exe"
DEVNULL="NUL"
;;
- SunOS)
+ sunos)
SYS="SunOS"
CFLAGS="$CFLAGS -DHAVE_MALLOC_H"
LDFLAGS="$LDFLAGS -lm"
@@ -114,9 +213,8 @@
;;
esac
-UNAMEM="`uname -m`"
case "$UNAMEM" in
- i386|i486|i586|i686|BePC)
+ i386|i486|i586|i686|bepc)
ARCH="X86"
CFLAGS="$CFLAGS -DHAVE_MMXEXT -DHAVE_SSE2"
AS="nasm"
@@ -137,7 +235,7 @@
AS="yasm"
ASFLAGS="-f elf -m amd64"
;;
- "Power Macintosh"|ppc|ppc64)
+ "power macintosh"|ppc|ppc64)
ARCH="PPC"
if [ $SYS = MACOSX ]
then
@@ -186,89 +282,6 @@
CFLAGS="$CFLAGS -DARCH_$ARCH -DSYS_$SYS"
# parse options
-
-for opt do
- optarg="${opt#*=}"
- case "$opt" in
- --prefix=*)
- prefix="$optarg"
- ;;
- --exec-prefix=*)
- exec_prefix="$optarg"
- ;;
- --bindir=*)
- bindir="$optarg"
- ;;
- --libdir=*)
- libdir="$optarg"
- ;;
- --includedir=*)
- includedir="$optarg"
- ;;
- --enable-avis-input)
- avis_input="yes"
- ;;
- --disable-avis-input)
- avis_input="no"
- ;;
- --enable-mp4-output)
- mp4_output="yes"
- ;;
- --disable-mp4-output)
- mp4_output="no"
- ;;
- --extra-asflags=*)
- ASFLAGS="$ASFLAGS ${opt#--extra-asflags=}"
- ;;
- --extra-cflags=*)
- CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
- VFW_CFLAGS="${opt#--extra-cflags=}"
- ;;
- --extra-ldflags=*)
- LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
- VFW_LDFLAGS="${opt#--extra-ldflags=}"
- ;;
- --enable-pthread)
- pthread="yes"
- ;;
- --disable-pthread)
- pthread="no"
- ;;
- --enable-debug)
- CFLAGS="$CFLAGS -g"
- debug="yes"
- ;;
- --enable-gprof)
- CFLAGS="$CFLAGS -pg"
- LDFLAGS="$LDFLAGS -pg"
- gprof="yes"
- ;;
- --enable-pic)
- pic="yes"
- ;;
- --enable-vfw)
- vfw="yes"
- ;;
- --disable-vfw)
- vfw="no"
- ;;
- --enable-shared)
- shared="yes"
- if [ $ARCH = "X86_64" -o $ARCH = "PPC" -o $ARCH = "ALPHA" ] ; then
- pic="yes"
- fi
- ;;
- --enable-visualize)
- LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
- CFLAGS="$CFLAGS -DVISUALIZE=1"
- vis="yes"
- ;;
- *)
- echo "Unknown option $opt, ignored"
- ;;
- esac
-done
-
--- configure (revision 736)
+++ configure (working copy)
@@ -338,6 +338,7 @@
# autodetect options that weren't forced nor disabled
libpthread=""
+extradef=""
if test "$pthread" = "auto" ; then
@@ -360,5 +363,8 @@
VFW=$vfw
pthread="no"
case $SYS in
@@ -345,16 +346,18 @@
pthread="yes"
;;
MINGW|CYGWIN)
- if cc_check pthread.h -lpthread "pthread_create(0,0,0,0);" ; then
+ if cc_check pthread.h -lpthread "pthread_create(0,0,0,0); pthread_num_processors_np();" ; then
pthread="yes"
libpthread="-lpthread"
- elif cc_check pthread.h -lpthreadGC2 "pthread_create(0,0,0,0);" ; then
+ elif cc_check pthread.h -lpthreadGC2 "pthread_create(0,0,0,0); pthread_num_processors_np();" ; then
pthread="yes"
libpthread="-lpthreadGC2"
- elif cc_check pthread.h "-lpthreadGC2 -lwsock32 -DPTW32_STATIC_LIB" "pthread_create(0,0,0,0);" ; then
+ elif cc_check pthread.h "-lpthreadGC2 -lwsock32 -DPTW32_STATIC_LIB" "pthread_create(0,0,0,0); pthread_num_processors_np();" ; then
pthread="yes"
libpthread="-lpthreadGC2 -lwsock32"
CFLAGS="$CFLAGS -DPTW32_STATIC_LIB"
+ extradef="-DPTW32_STATIC_LIB"
+
fi
;;
*)
@@ -438,6 +441,10 @@
ASFLAGS=$ASFLAGS
GTK=$gtk
EXE=$EXE
+AR=$AR
+STRIP=$STRIP
+AROPTS=$AROPTS
+RANLIB=$RANLIB
VIS=$vis
HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG
DEVNULL=$DEVNULL
@@ -480,7 +487,7 @@
Description: H.264 (MPEG4 AVC) encoder library
Version: $(grep POINTVER < config.h | sed -e 's/.* "//; s/".*//')
Libs: $pclibs
-Cflags: -I$includedir
+Cflags: -I$includedir $extradef
EOF
Index: Makefile
===================================================================
--- Makefile (rvision 547)
+++ Makefile (copie de travail)
@@ -64,8 +64,8 @@
--- Makefile (revision 736)
+++ Makefile (working copy)
@@ -74,8 +74,8 @@
default: $(DEP) x264$(EXE)
libx264.a: .depend $(OBJS) $(OBJASM)
......@@ -288,8 +67,18 @@ Index: Makefile
$(SONAME): .depend $(OBJS) $(OBJASM)
$(CC) -shared -o $@ $(OBJS) $(OBJASM) -Wl,-soname,$(SONAME) $(LDFLAGS)
@@ -135,14 +135,14 @@
rm -f config.mak config.h vfw/build/cygwin/config.mak gtk/config.mak x264.pc
@@ -94,7 +94,7 @@
%.o: %.asm
$(AS) $(ASFLAGS) -o $@ $<
# delete local/anonymous symbols, so they don't show up in oprofile
- -@ strip -x $@
+ -@ $(STRIP) -x $@
.depend: config.mak
rm -f .depend
@@ -149,14 +149,14 @@
rm -rf test/
$(MAKE) -C gtk distclean
-install: x264 $(SONAME)
+install: x264$(EXE)
......@@ -300,8 +89,8 @@ Index: Makefile
install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
- install x264 $(DESTDIR)$(bindir)
- ranlib $(DESTDIR)$(libdir)/libx264.a
+ install x264$(EXE) $(DESTDIR)$(bindir)
+ install x264$(EXE) $(DESTDIR)$(bindir)
+ $(RANLIB) $(DESTDIR)$(libdir)/libx264.a
$(if $(SONAME), ln -sf $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(libdir)/libx264.so)
$(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.so)
$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
......@@ -23,8 +23,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
# ***************************************************************************
GNU=http://ftp.heanet.ie/mirrors/ftp.gnu.org/gnu
SF=http://heanet.dl.sourceforge.net/sourceforge
GNU=ftp://ftp.esat.net/pub/gnu
SF=http://internap.dl.sourceforge.net/sourceforge
VIDEOLAN=http://download.videolan.org/pub/videolan
PERL_VERSION=5.8.8
PERL_URL=http://ftp.funet.fi/pub/CPAN/src/perl-$(PERL_VERSION).tar.gz
......@@ -176,8 +176,8 @@ UPNP_URL=$(SF)/upnp/libupnp-$(UPNP_VERSION).tar.gz
EXPAT_VERSION=1.95.8
EXPAT_URL=$(SF)/expat/expat-$(EXPAT_VERSION).tar.gz
NASM_CVSROOT=:pserver:anonymous@cvs.sourceforge.net:/cvsroot/nasm
NASM_VERSION=0.98.40-20060130
NASM_URL=$(VIDEOLAN)/testing/contrib/nasm-0.98.40-20060130.tar.bz2
NASM_VERSION=2.02
NASM_URL=$(SF)/nasm/nasm-$(NASM_VERSION).tar.bz2
PTHREADS_VERSION=2-7-0
PTHREADS_URL=ftp://sources.redhat.com/pub/pthreads-win32/pthreads-w32-$(PTHREADS_VERSION)-release.tar.gz
UNICOWS_VERSION=1.1.1
......
......@@ -550,10 +550,15 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
# define __MIN(a, b) ( ((a) < (b)) ? (a) : (b) )
#endif
static int64_t GCD( int64_t a, int64_t b )
static inline int64_t GCD( int64_t a, int64_t b )
{
if( b ) return GCD( b, a % b );
else return a;
while( b )
{
int64_t c = a % b;
a = b;
b = c;
}
return a;
}
/* Dynamic array handling: realloc array, move data, increment position */
......
glibc2.m4
intmax.m4
longdouble.m4
longlong.m4
nls.m4
po.m4
printf-posix.m4
private.m4
size_max.m4
wchar_t.m4
wint_t.m4
xsize.m4
......@@ -138,9 +138,16 @@ static sdpplin_stream_t *sdpplin_parse_stream(char **data) {
handled=0;
if(filter(*data,"a=control:streamid=",&buf, BUFLEN)) {
desc->stream_id=atoi(buf);
handled=1;
*data=nl(*data);
/* This way negative values are mapped to unfeasibly high
* values, and will be discarded afterward
*/
unsigned long tmp = strtoul(buf, NULL, 10);
if ( tmp > UINT16_MAX )
lprintf("stream id out of bound: %lu\n", tmp);
else
desc->stream_id=tmp;
handled=1;
*data=nl(*data);
}
if(filter(*data,"a=MaxBitRate:integer;",&buf, BUFLEN)) {
desc->max_bit_rate=atoi(buf);
......@@ -254,7 +261,10 @@ sdpplin_t *sdpplin_parse(char *data) {
}
stream=sdpplin_parse_stream(&data);
lprintf("got data for stream id %u\n", stream->stream_id);
desc->stream[stream->stream_id]=stream;
if ( stream->stream_id >= desc->stream_count )
lprintf("stream id %u is greater than stream count %u\n", stream->stream_id, desc->stream_count);
else
desc->stream[stream->stream_id]=stream;
continue;
}
if(filter(data,"a=Title:buffer;",&buf, BUFLEN)) {
......@@ -290,10 +300,17 @@ sdpplin_t *sdpplin_parse(char *data) {
}
}
if(filter(data,"a=StreamCount:integer;",&buf, BUFLEN)) {
desc->stream_count=atoi(buf);
desc->stream = malloc(sizeof(sdpplin_stream_t*)*desc->stream_count);
handled=1;
data=nl(data);
/* This way negative values are mapped to unfeasibly high
* values, and will be discarded afterward
*/
unsigned long tmp = strtoul(buf, NULL, 10);
if ( tmp > UINT16_MAX )
lprintf("stream count out of bound: %lu\n", tmp);
else
desc->stream_count = tmp;
desc->stream = malloc(sizeof(sdpplin_stream_t*)*desc->stream_count);
handled=1;
data=nl(data);
}
if(filter(data,"a=Flags:integer;",&buf, BUFLEN)) {
desc->flags=atoi(buf);
......
......@@ -31,7 +31,7 @@ typedef struct {
char *id;
char *bandwidth;
int stream_id;
uint16_t stream_id;
char *range;
char *length;
char *rtpmap;
......@@ -75,7 +75,7 @@ typedef struct {
int flags;
int is_real_data_type;
int stream_count;
uint16_t stream_count;
char *title;
char *author;
char *copyright;
......
......@@ -59,8 +59,8 @@ typedef struct
{
int b_grayscale; /* force to grayscale */
int i_width;
int i_height;
unsigned int i_width;
unsigned int i_height;
int i_stride_x;
int i_stride_y;
......@@ -89,7 +89,7 @@ struct decoder_sys_t
static picture_t *DecodeBlock ( decoder_t *, block_t ** );
static int cinepak_decode_frame( cinepak_context_t *, int, uint8_t * );
static int cinepak_decode_frame( cinepak_context_t *, size_t, uint8_t * );
/*****************************************************************************
* OpenDecoder: probe the decoder and return score
......@@ -282,6 +282,16 @@ static void cinepak_Getv4( cinepak_context_t *p_context,
uint8_t i_index[4];
int i,j;
size_t y_max = p_context->i_stride[0] * ( i_y + 5 ) + i_x + 5;
size_t u_max = p_context->i_stride[1] * ( ( i_y/2 ) + 2 ) + 2 + ( i_x / 2 );
size_t v_max = p_context->i_stride[2] * ( ( i_y/2 ) + 2 ) + 2 + ( i_x / 2 );
size_t y_siz = p_context->i_stride[0] * p_context->i_lines[0];
size_t u_siz = p_context->i_stride[1] * p_context->i_lines[1];
size_t v_siz = p_context->i_stride[2] * p_context->i_lines[2];
/* boundary check */
if( y_max >= y_siz || u_max >= u_siz || v_max >= v_siz )
return;
uint8_t *p_dst_y, *p_dst_u, *p_dst_v;
#define PIX_SET_Y( x, y, v ) \
p_dst_y[(x) + (y)* p_context->i_stride[0]] = (v);
......@@ -329,6 +339,16 @@ static void cinepak_Getv1( cinepak_context_t *p_context,
uint8_t i_index;
int i,j;
size_t y_max = p_context->i_stride[0] * ( i_y + 5 ) + i_x + 5;
size_t u_max = p_context->i_stride[1] * ( ( i_y/2 ) + 2 ) + 2 + ( i_x / 2 );
size_t v_max = p_context->i_stride[2] * ( ( i_y/2 ) + 2 ) + 2 + ( i_x / 2 );
size_t y_siz = p_context->i_stride[0] * p_context->i_lines[0];
size_t u_siz = p_context->i_stride[1] * p_context->i_lines[1];
size_t v_siz = p_context->i_stride[2] * p_context->i_lines[2];
/* boundary check */
if( y_max >= y_siz || u_max >= u_siz || v_max >= v_siz )
return;
uint8_t *p_dst_y, *p_dst_u, *p_dst_v;
#define PIX_SET_Y( x, y, v ) \
p_dst_y[(x) + (y)* p_context->i_stride[0]] = (v);
......@@ -371,14 +391,14 @@ static void cinepak_Getv1( cinepak_context_t *p_context,
* The function that decode one frame
*****************************************************************************/
static int cinepak_decode_frame( cinepak_context_t *p_context,
int i_length, uint8_t *p_data )
size_t i_length, uint8_t *p_data )
{
int i_strip;
int i_frame_flags;
int i_frame_size;
int i_width, i_height;
int i_frame_strips;
int8_t i_frame_flags;
uint32_t i_frame_size;
uint16_t i_width, i_height;
uint16_t i_frame_strips;
int i_index;
int i_strip_x1 =0, i_strip_y1=0;
int i_strip_x2 =0, i_strip_y2=0;
......@@ -396,7 +416,8 @@ static int cinepak_decode_frame( cinepak_context_t *p_context,
i_height = GET2BYTES( p_data );
i_frame_strips = GET2BYTES( p_data );
if( !i_frame_size || !i_width || !i_height )
if( !i_frame_size || !i_width || !i_height ||
i_width > 0xffff-3 || i_height > 0xffff-3)
{
/* Broken header */
return( -1 );
......@@ -447,15 +468,15 @@ static int cinepak_decode_frame( cinepak_context_t *p_context,
/* Now decode each strip */
for( i_strip = 0; i_strip < i_frame_strips; i_strip++ )
{
int i_strip_id;
int i_strip_size;
uint16_t i_strip_size;
if( i_length <= 12 )
{
break;
}
i_strip_id = GET2BYTES( p_data );
p_data += 2; /* int16_t i_strip_id = GET2BYTES( p_data ); */
i_strip_size = GET2BYTES( p_data );
i_strip_size = __MIN( i_strip_size, i_length );
/* FIXME I don't really understand how it's work; */
......
......@@ -5845,7 +5845,7 @@ bool dvd_chapter_codec_c::Enter()
binary *p_data = (*index)->GetBuffer();
size_t i_size = *p_data++;
// avoid reading too much from the buffer
i_size = min( i_size, ((*index)->GetSize() - 1) >> 3 );
i_size = __MIN( i_size, ((*index)->GetSize() - 1) >> 3 );
for ( ; i_size > 0; i_size--, p_data += 8 )
{
msg_Dbg( &sys.demuxer, "Matroska DVD enter command" );
......@@ -5868,7 +5868,7 @@ bool dvd_chapter_codec_c::Leave()
binary *p_data = (*index)->GetBuffer();
size_t i_size = *p_data++;
// avoid reading too much from the buffer
i_size = min( i_size, ((*index)->GetSize() - 1) >> 3 );
i_size = __MIN( i_size, ((*index)->GetSize() - 1) >> 3 );
for ( ; i_size > 0; i_size--, p_data += 8 )
{
msg_Dbg( &sys.demuxer, "Matroska DVD leave command" );
......
This diff is collapsed.
......@@ -460,6 +460,11 @@ static int Open( vlc_object_t * p_this )
else
{
p_sys->i_timescale = p_mvhd->data.p_mvhd->i_timescale;
if( p_sys->i_timescale == 0 )
{
msg_Err( p_this, "bad timescale" );
goto error;
}
p_sys->i_duration = p_mvhd->data.p_mvhd->i_duration;
}
......@@ -1780,6 +1785,8 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
}
p_track->i_timescale = p_mdhd->data.p_mdhd->i_timescale;
if( !p_track->i_timescale )
return;
for( i = 0; i < 3; i++ )
{
......
......@@ -2,7 +2,7 @@
* m3u.c : M3U playlist format import
*****************************************************************************
* Copyright (C) 2004 the VideoLAN team
* $Id$
* $Id: ac17d2bfd574048ba5465a43e64cf7afb3746c71 $
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Sigmund Augdal Helberg <dnumgis@videolan.org>
......@@ -30,6 +30,7 @@
#include <vlc/vlc.h>
#include <vlc/input.h>
#include <vlc/intf.h>
#include "vlc_interaction.h"
#include "charset.h"
#include <errno.h> /* ENOMEM */
......@@ -207,6 +208,8 @@ static int Demux( demux_t *p_demux )
}
else
{
intf_UserFatal( p_demux, _("Options disabled") ,
_("m3u EXTVLCOPT parsing is disabled for security reasons.\nIf you need it and trust the m3u playlist you are trying to open, please enable it from:\nPreferences > Input/Codecs > Demuxers > Playlist > Enable parsinf of EXTVLCOPT: options.\nDon't forget to disable it before opening an untrusted playlist") );
msg_Err( p_demux, "m3u EXTVLCOPT parsing is disabled for security reasons. If you need it and trust the m3u playlist you are trying to open, please append --m3u-extvlcopt to your command line." );
}
}
......
......@@ -2,7 +2,7 @@
* subtitle.c: Demux for subtitle text files.
*****************************************************************************
* Copyright (C) 1999-2004 the VideoLAN team
* $Id$
* $Id: 6990562ea05f756333a9a79d2d41a4dcc407331c $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Derk-Jan Hartman <hartman at videolan dot org>
......@@ -685,7 +685,8 @@ static void TextPreviousLine( text_t *txt )
/*****************************************************************************
* Specific Subtitle function
*****************************************************************************/
#define MAX_LINE 8192
#define MAX_LINE 8192 /* must store the null terminator */
#define MAX_LINE_STR "8191" /* used in *scanf() regexps */
static int ParseMicroDvd( demux_t *p_demux, subtitle_t *p_subtitle )
{
demux_sys_t *p_sys = p_demux->p_sys;
......@@ -722,9 +723,9 @@ next:
i_start = 0;
i_stop = 0;
memset( buffer_text, '\0', MAX_LINE );
if( sscanf( s, "{%d}{}%8192[^\r\n]", &i_start, buffer_text ) == 2 ||
sscanf( s, "{%d}{%d}%8192[^\r\n]", &i_start, &i_stop, buffer_text ) == 3)
memset( buffer_text, '\0', MAX_LINE + 1 );
if( sscanf( s, "{%d}{}%"MAX_LINE_STR"[^\r\n]", &i_start, buffer_text ) == 2 ||
sscanf( s, "{%d}{%d}%"MAX_LINE_STR"[^\r\n]", &i_start, &i_stop, buffer_text ) == 3)
{
break;
}
......@@ -981,7 +982,7 @@ static int ParseSSA( demux_t *p_demux, subtitle_t *p_subtitle )
* Dialogue: Layer#,0:02:40.65,0:02:41.79,Wolf main,Cher,0000,0000,0000,,Et les enregistrements de ses ondes delta ?
*/
if( sscanf( s,
"Dialogue: %[^,],%d:%d:%d.%d,%d:%d:%d.%d,%81920[^\r\n]",
"Dialogue: %"MAX_LINE_STR"0[^,],%d:%d:%d.%d,%d:%d:%d.%d,%"MAX_LINE_STR"0[^\r\n]",
buffer_text2,
&h1, &m1, &s1, &c1,
&h2, &m2, &s2, &c2,
......@@ -1074,8 +1075,8 @@ static int ParseVplayer( demux_t *p_demux, subtitle_t *p_subtitle )
i_start = 0;
memset( buffer_text, '\0', MAX_LINE );
if( sscanf( p, "%d:%d:%d%[ :]%81920[^\r\n]", &h, &m, &s, &c, buffer_text ) == 5 )
memset( buffer_text, '\0', MAX_LINE + 1 );
if( sscanf( p, "%d:%d:%d%[ :]%"MAX_LINE_STR"0[^\r\n]", &h, &m, &s, &c, buffer_text ) == 5 )
{
i_start = ( (int64_t)h * 3600*1000 +
(int64_t)m * 60*1000 +
......
......@@ -2,7 +2,7 @@
* embeddedwindow.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2002-2005 the VideoLAN team
* $Id$
* $Id: 3bb1ea9a38b042486f837029f401ecd63700e444 $
*
* Authors: Benjamin Pracht <bigben at videolan dot org>
*
......@@ -70,7 +70,6 @@
* in middle of an animation, providing that the enter/leave functions
* are called from the same thread */
o_animation_lock = [[NSRecursiveLock alloc] init];
b_animation_lock_alreadylocked = NO;
}
- (void)setTime:(NSString *)o_arg_time position:(float)f_position
......@@ -174,8 +173,8 @@
NSRect screen_rect;
NSRect rect;
vout_thread_t *p_vout = vlc_object_find( VLCIntf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
BOOL blackout_other_displays = var_GetBool( p_vout, "macosx-black" );
BOOL blackout_other_displays = config_GetInt( VLCIntf, "macosx-black" );
screen = [NSScreen screenWithDisplayID: (CGDirectDisplayID)var_GetInteger( p_vout, "video-device" )];
if( !screen )
{
......@@ -216,8 +215,8 @@
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
if (blackout_other_displays)
[screen blackoutOtherScreens]; /* We should do something like [screen blackoutOtherScreens]; */
[screen blackoutOtherScreens];
[o_view retain];
[[self contentView] replaceSubview:o_view with:o_temp_view];
[o_temp_view setFrame:[o_view frame]];
......@@ -232,11 +231,7 @@
[self hasBecomeFullscreen];
return;
}
if (blackout_other_displays)
[screen blackoutOtherScreens]; /* We should do something like [screen blackoutOtherScreens]; */
b_animation_lock_alreadylocked = NO;
[self unlockFullscreenAnimation];
}
......@@ -274,8 +269,7 @@
{
/* We always try to do so */
[NSScreen unblackoutScreens];
b_animation_lock_alreadylocked = NO;
[self unlockFullscreenAnimation];
return;
}
......@@ -287,7 +281,7 @@
CGDisplayFade( token, 0.3, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, YES );
[[[[VLCMain sharedInstance] getControls] getFSPanel] setNonActive: nil];
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
SetSystemUIMode( kUIModeNormal, 0);
/* We always try to do so */
[NSScreen unblackoutScreens];
......@@ -320,7 +314,6 @@
[o_fullscreen_window release];
o_fullscreen_window = nil;
b_animation_lock_alreadylocked = NO;
[self unlockFullscreenAnimation];
}
......
/*****************************************************************************
* misc.m: code not specific to vlc
*****************************************************************************
* Copyright (C) 2003-2005 the VideoLAN team
* $Id$
* Copyright (C) 2003-2008 the VideoLAN team
* $Id: 68d5c2e4bb6e3b6aed4dadf8dd76c76dcfee4794 $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Felix Paul Kühne <fkuehne at videolan dot org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -21,12 +22,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <Cocoa/Cocoa.h>
#import <Cocoa/Cocoa.h>
#import <QuickTime/QuickTime.h>
#include "intf.h" /* VLCApplication */
#include "misc.h"
#include "playlist.h"
#include "controls.h"
#import "intf.h" /* VLCApplication */
#import "misc.h"
#import "playlist.h"
#import "controls.h"
/*****************************************************************************
* NSScreen (VLCAdditions)
......@@ -77,10 +79,9 @@ static NSMutableArray *blackoutWindows = NULL;
unsigned int i;
/* Free our previous blackout window (follow blackoutWindow alloc strategy) */
[blackoutWindows makeObjectsPerformSelector:@selector(close)];
[blackoutWindows makeObjectsPerformSelector:@selector(orderOut:)];
[blackoutWindows removeAllObjects];
for(i = 0; i < [[NSScreen screens] count]; i++)
{
NSScreen *screen = [[NSScreen screens] objectAtIndex: i];
......@@ -91,7 +92,7 @@ static NSMutableArray *blackoutWindows = NULL;
continue;
screen_rect = [screen frame];
screen_rect.origin.x = screen_rect.origin.y = 0.0f;
screen_rect.origin.x = screen_rect.origin.y = 0;
/* blackoutWindow alloc strategy
- The NSMutableArray blackoutWindows has the blackoutWindow references
......@@ -102,10 +103,14 @@ static NSMutableArray *blackoutWindows = NULL;
[blackoutWindow setBackgroundColor:[NSColor blackColor]];
[blackoutWindow setLevel: NSFloatingWindowLevel]; /* Disappear when Expose is triggered */
[blackoutWindow displayIfNeeded];
[blackoutWindow orderFront: self];
[blackoutWindows addObject: blackoutWindow];
[blackoutWindow release];
if( [screen isMainScreen ] )
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
}
}
......@@ -116,8 +121,10 @@ static NSMutableArray *blackoutWindows = NULL;
for(i = 0; i < [blackoutWindows count]; i++)
{
VLCWindow *blackoutWindow = [blackoutWindows objectAtIndex: i];
[blackoutWindow close];
[blackoutWindow orderOut: self];
}
SetSystemUIMode( kUIModeNormal, 0);
}
@end
......
......@@ -910,7 +910,7 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
char *psz_eof = NULL;
char *psz_parse = NULL;
char *psz_uri = NULL;
char *psz_proto = NULL;
const char *psz_proto = NULL;
char psz_source[258] = "";
int i_port = 0;
......@@ -1041,31 +1041,33 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
if( psz_eof )
{
*psz_eof = '\0';
psz_proto = strdup( psz_parse );
psz_parse = psz_eof + 1;
p_sdp->i_media_type = atoi( psz_parse );
if( !strcmp( psz_parse, "RTP/AVP" ) )
{
psz_proto = "rtp";
p_sdp->i_media_type = atoi( psz_parse );
}
else
if( !strcasecmp( psz_parse, "udp" ) )
{
psz_proto = "udp";
p_sdp->i_media_type = 33;
}
else
{
msg_Warn( p_obj, "unknown transport protocol %s", psz_parse );
FREE( psz_uri );
return VLC_EGENERIC;
}
}
else
{
msg_Dbg( p_obj, "incorrect m field, %s", p_sdp->psz_media );
p_sdp->i_media_type = 33;
psz_proto = strdup( psz_parse );
msg_Warn( p_obj, "unknown top parse m field (3)" );
FREE( psz_uri );
return VLC_EGENERIC;
}
}
if( psz_proto && !strncmp( psz_proto, "RTP/AVP", 7 ) )
{
free( psz_proto );
psz_proto = strdup( "rtp" );
}
if( psz_proto && !strncasecmp( psz_proto, "UDP", 3 ) )
{
free( psz_proto );
psz_proto = strdup( "udp" );
}
/* FIXME: HTTP support */
if( i_port == 0 )
......@@ -1092,7 +1094,6 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
psz_uri, i_port );
FREE( psz_uri );
FREE( psz_proto );
return VLC_SUCCESS;
}
......
......@@ -13,9 +13,9 @@ data 'carb' (0)
resource 'STR#' (126)
{
{
"Version 0.8.6, copyright 1996-2006 The VideoLAN Team"
"Version 0.8.6, copyright 1996-2008 The VideoLAN Team"
"<BR><A HREF='http://www.videolan.org'>http://www.videolan.org</A>",
"VLC Multimedia Plugin"
"VLC Multimedia Plug-in"
};
};
......@@ -23,13 +23,45 @@ resource 'STR#' (126)
resource 'STR#' (127)
{
{
/* MPEG-1 and MPEG-2 */
"MPEG audio",
"MPEG audio",
"MPEG video",
"MPEG video",
"MPEG video",
"MPEG video",
/* MPEG-4 */
"MPEG-4 video",
"MPEG-4 audio",
"MPEG-4 video",
"MPEG-4 video",
/* AVI */
"AVI video",
/* Quicktime */
/* "QuickTime video", */
/* OGG */
"Ogg stream",
"Ogg stream",
/* VLC */
"VLC plugin",
"VLC plug-in",
/* Windows Media */
"Windows Media video",
"Windows Media video",
"Windows Media plug-in",
"Windows Media video",
/* Google VLC */
"Google VLC plugin",
"Google VLC plug-in",
/* WAV audio */
"WAV audio",
"WAV audio",
/* 3GPP */
"3GPP audio",
"3GPP video",
/* 3GPP2 */
"3GPP2 audio",
"3GPP2 video",
/* DIVX */
"DivX video",
};
};
......@@ -37,13 +69,45 @@ resource 'STR#' (127)
resource 'STR#' (128,"MIME Type")
{
{
/* MPEG-1 and MPEG-2 */
"audio/mpeg", "mp2,mp3,mpga,mpega",
"audio/x-mpeg", "mp2,mp3,mpga,mpega",
"video/mpeg", "mpg,mpeg,mpe",
"video/x-mpeg", "mpg,mpeg,mpe",
"video/mpeg-system", "mpg,mpeg,vob",
"video/x-mpeg-system", "mpg,mpeg,vob",
/* MPEG-4 */
"video/mpeg4", "mp4,mpg4",
"audio/mpeg4", "mp4,mpg4",
"application/mpeg4-iod", "mp4,mpg4",
"application/mpeg4-muxcodetable", "mp4,mpg4",
/* AVI */
"video/x-msvideo", "avi",
/* Quicktime */
/* "video/quicktime", "mov,qt", */
/* OGG */
"application/ogg", "ogg",
"application/x-ogg", "ogg",
/* VLC */
"application/x-vlc-plugin", "vlc",
/* Windows Media */
"video/x-ms-asf-plugin", "asf,asx",
"video/x-ms-asf", "asf,asx",
"application/x-mplayer2", "",
"video/x-ms-wmv", "wmv",
/* Google VLC */
"video/x-google-vlc-plugin", "",
/* WAV audio */
"audio/wav", "wav",
"audio/x-wav", "wav",
/* 3GPP */
"audio/3gpp", "3gp,3gpp",
"video/3gpp", "3gp,3gpp",
/* 3GPP2 */
"audio/3gpp2", "3g2,3gpp2",
"video/3gpp2", "3g2,3gpp2",
/* DIVX */
"video/divx", "divx",
};
};
*.gmo
*.header
*.sed
*.sin
POTFILES
Rules-quot
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment