aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2013-03-22 18:26:46 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2013-03-22 18:26:46 +0100
commitd1582288d6ad75e7f60032a96863afe136d01e63 (patch)
treeafb084f180790363535ae0c3d1d2cd0f17f97a16
parent8238c0aa6a13ad4be43b1346396d53354545e594 (diff)
Imported Upstream version 1.0.6upstream/1.0.6
-rw-r--r--ChangeLog42
-rw-r--r--NEWS13
-rwxr-xr-xconfigure36
-rw-r--r--configure.ac6
-rw-r--r--ext/libav/gstavutils.c1
-rw-r--r--ext/libav/gstavviddec.c32
-rw-r--r--gst-libav.doap10
-rw-r--r--gst-libav.spec2
-rw-r--r--gst-libs/ext/libav/.gitignore1
-rw-r--r--gst-libs/ext/libav/Changelog19
-rw-r--r--gst-libs/ext/libav/Makefile5
-rw-r--r--gst-libs/ext/libav/RELEASE2
-rw-r--r--gst-libs/ext/libav/avconv.c57
-rw-r--r--gst-libs/ext/libav/common.mak9
-rwxr-xr-xgst-libs/ext/libav/configure5
-rw-r--r--gst-libs/ext/libav/doc/APIchanges8
-rw-r--r--gst-libs/ext/libav/doc/developer.texi4
-rw-r--r--gst-libs/ext/libav/libavcodec/aacdec.c2
-rw-r--r--gst-libs/ext/libav/libavcodec/alac.c7
-rw-r--r--gst-libs/ext/libav/libavcodec/flacenc.c8
-rw-r--r--gst-libs/ext/libav/libavcodec/flashsv.c10
-rw-r--r--gst-libs/ext/libav/libavcodec/h264.c35
-rw-r--r--gst-libs/ext/libav/libavcodec/h264_ps.c22
-rw-r--r--gst-libs/ext/libav/libavcodec/indeo3.c31
-rw-r--r--gst-libs/ext/libav/libavcodec/ivi_common.c5
-rw-r--r--gst-libs/ext/libav/libavcodec/mpeg12.c3
-rw-r--r--gst-libs/ext/libav/libavcodec/mpeg12.h1
-rw-r--r--gst-libs/ext/libav/libavcodec/mpegaudiodec.c32
-rw-r--r--gst-libs/ext/libav/libavcodec/svq3.c16
-rw-r--r--gst-libs/ext/libav/libavcodec/vp5.c12
-rw-r--r--gst-libs/ext/libav/libavcodec/vp56.c14
-rw-r--r--gst-libs/ext/libav/libavcodec/vp56.h2
-rw-r--r--gst-libs/ext/libav/libavcodec/vp6.c16
-rw-r--r--gst-libs/ext/libav/libavcodec/vp8.c1
-rw-r--r--gst-libs/ext/libav/libavformat/id3v2.c18
-rw-r--r--gst-libs/ext/libav/libavformat/oggdec.c53
-rw-r--r--gst-libs/ext/libav/libavformat/rtsp.c8
-rw-r--r--gst-libs/ext/libav/libavformat/utils.c5
-rw-r--r--gst-libs/ext/libav/libavformat/version.h2
-rw-r--r--gst-libs/ext/libav/libavformat/yuv4mpeg.c5
-rw-r--r--gst-libs/ext/libav/libavutil/opt.c6
-rw-r--r--gst-libs/ext/libav/library.mak3
42 files changed, 386 insertions, 183 deletions
diff --git a/ChangeLog b/ChangeLog
index 2fd4760..c5a58b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,47 @@
+=== release 1.0.6 ===
+
+2013-03-22 Tim-Philipp Müller <tim@centricular.net>
+
+ * configure.ac:
+ releasing 1.0.6
+
+2013-02-25 10:38:09 +0000 Tim-Philipp Müller <tim@centricular.net>
+
+ * ext/libav/gstavutils.c:
+ * ext/libav/gstavviddec.c:
+ avviddec: fix H.264 decoding errors by disabling multi-threaded decoding
+ Multi-threaded decoding does not work properly with the older libav 0.8
+ version included in this gst-libav series, so just disable multi-threaded
+ decoding again entirely for now. (We could also switch from FF_THREAD_SLICE
+ to FF_THREAD_FRAME, but that may have other side-effects and just disabling
+ it seems safest for now).
+ This works properly in git master with more recent libav 0.9.x versions.
+ Adventurous users may still re-enable this functionality by setting
+ the GST_AVVIDDEC_MAX_THREADS environment variable to 'auto' or the
+ max. number of threads desired.
+ https://bugzilla.gnome.org/show_bug.cgi?id=694230
+
+2013-02-11 15:52:52 +0000 Tim-Philipp Müller <tim.muller@collabora.co.uk>
+
+ * gst-libs/ext/libav:
+ libav: Update to 0.8.5 release
+
+2013-01-14 17:00:17 +0100 Andoni Morales Alastruey <ylatuya@gmail.com>
+
+ * configure.ac:
+ libav: fix checks for internal libav configure options
+ https://bugzilla.gnome.org/show_bug.cgi?id=691723
+
=== release 1.0.5 ===
-2013-01-08 Tim-Philipp Müller <tim.muller@collabora.co.uk>
+2013-01-08 10:56:21 +0000 Tim-Philipp Müller <tim.muller@collabora.co.uk>
+ * ChangeLog:
+ * NEWS:
+ * RELEASE:
* configure.ac:
- releasing 1.0.5
+ * gst-libav.doap:
+ Release 1.0.5
2012-12-31 00:32:41 +0000 Tim-Philipp Müller <tim@centricular.net>
diff --git a/NEWS b/NEWS
index e90ea53..dd7bb4c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,15 @@
-This is GStreamer Libav Plugins 1.0.5
+This is GStreamer Libav Plugins 1.0.6
+
+Changes since 1.0.5:
+
+ * avviddec: fix H.264 decoding errors in some files by disabling multi-threaded decoding
+ * libav: fix checks for internal libav configure options
+ * libav: Update to 0.8.5 release
+
+Bugs fixed since 1.0.5:
+
+ * 691723 : libav: fix checks for internal libav configure options
+ * 694230 : quicktime videos have decoding issues in gst-1.x
Changes since 1.0.4:
diff --git a/configure b/configure
index f955149..15813cb 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for GStreamer libav 1.0.5.
+# Generated by GNU Autoconf 2.69 for GStreamer libav 1.0.6.
#
# Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer>.
#
@@ -591,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='GStreamer libav'
PACKAGE_TARNAME='gst-libav'
-PACKAGE_VERSION='1.0.5'
-PACKAGE_STRING='GStreamer libav 1.0.5'
+PACKAGE_VERSION='1.0.6'
+PACKAGE_STRING='GStreamer libav 1.0.6'
PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer'
PACKAGE_URL=''
@@ -1505,7 +1505,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures GStreamer libav 1.0.5 to adapt to many kinds of systems.
+\`configure' configures GStreamer libav 1.0.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1576,7 +1576,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of GStreamer libav 1.0.5:";;
+ short | recursive ) echo "Configuration of GStreamer libav 1.0.6:";;
esac
cat <<\_ACEOF
@@ -1738,7 +1738,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GStreamer libav configure 1.0.5
+GStreamer libav configure 1.0.6
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2153,7 +2153,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by GStreamer libav $as_me 1.0.5, which was
+It was created by GStreamer libav $as_me 1.0.6, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3083,7 +3083,7 @@ fi
# Define the identity of the package.
PACKAGE='gst-libav'
- VERSION='1.0.5'
+ VERSION='1.0.6'
cat >>confdefs.h <<_ACEOF
@@ -3206,9 +3206,9 @@ $as_echo "$am_cv_prog_tar_ustar" >&6; }
- PACKAGE_VERSION_MAJOR=$(echo 1.0.5 | cut -d'.' -f1)
- PACKAGE_VERSION_MINOR=$(echo 1.0.5 | cut -d'.' -f2)
- PACKAGE_VERSION_MICRO=$(echo 1.0.5 | cut -d'.' -f3)
+ PACKAGE_VERSION_MAJOR=$(echo 1.0.6 | cut -d'.' -f1)
+ PACKAGE_VERSION_MINOR=$(echo 1.0.6 | cut -d'.' -f2)
+ PACKAGE_VERSION_MICRO=$(echo 1.0.6 | cut -d'.' -f3)
@@ -3219,7 +3219,7 @@ $as_echo "$am_cv_prog_tar_ustar" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking nano version" >&5
$as_echo_n "checking nano version... " >&6; }
- NANO=$(echo 1.0.5 | cut -d'.' -f4)
+ NANO=$(echo 1.0.6 | cut -d'.' -f4)
if test x"$NANO" = x || test "x$NANO" = "x0" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 0 (release)" >&5
@@ -7806,10 +7806,10 @@ fi
done
- GST_CURRENT=5
+ GST_CURRENT=6
GST_REVISION=0
- GST_AGE=5
- GST_LIBVERSION=5:0:5
+ GST_AGE=6
+ GST_LIBVERSION=6:0:6
@@ -17138,7 +17138,7 @@ fi
emblibav_configure_args="$emblibav_configure_args --nm=\\\"\\\$NM\\\""
fi
- LIBAV_OPTS="(cd $srcdir/gst-libs/ext/libav && ./configure --help)"
+ LIBAV_OPTS=`cd $srcdir/gst-libs/ext/libav && ./configure --help`
# Let's check if we can disable the building of the libav binary
can_disable=`echo "$LIBAV_OPTS" | grep 'disable-ffmpeg'`
if test "$can_disable" != ""; then
@@ -17838,7 +17838,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by GStreamer libav $as_me 1.0.5, which was
+This file was extended by GStreamer libav $as_me 1.0.6, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -17904,7 +17904,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-GStreamer libav config.status 1.0.5
+GStreamer libav config.status 1.0.6
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index b9ac2ee..22ede88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ(2.62)
dnl initialize autoconf
dnl when going to/from release please set the nano (fourth number) right !
dnl releases only do Wall, cvs and prerelease does Werror too
-AC_INIT(GStreamer libav, 1.0.5,
+AC_INIT(GStreamer libav, 1.0.6,
http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
gst-libav)
@@ -42,7 +42,7 @@ GST_API_VERSION=1.0
AC_SUBST(GST_API_VERSION)
AG_GST_LIBTOOL_PREPARE
-AS_LIBTOOL(GST, 5, 0, 5)
+AS_LIBTOOL(GST, 6, 0, 6)
dnl *** required versions of GStreamer stuff ***
GST_REQ=1.0.0
@@ -358,7 +358,7 @@ else
fi
dnl checks for extra enable/disable flags
- LIBAV_OPTS="(cd $srcdir/gst-libs/ext/libav && ./configure --help)"
+ LIBAV_OPTS=`cd $srcdir/gst-libs/ext/libav && ./configure --help`
# Let's check if we can disable the building of the libav binary
can_disable=`echo "$LIBAV_OPTS" | grep 'disable-ffmpeg'`
if test "$can_disable" != ""; then
diff --git a/ext/libav/gstavutils.c b/ext/libav/gstavutils.c
index 8555d8d..f7a80f6 100644
--- a/ext/libav/gstavutils.c
+++ b/ext/libav/gstavutils.c
@@ -476,6 +476,7 @@ gst_ffmpeg_auto_max_threads (void)
if (n < 1)
n = 1;
+ GST_INFO ("threads: %d", n);
g_once_init_leave (&n_threads, n);
}
diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c
index 669a75d..caf3e2e 100644
--- a/ext/libav/gstavviddec.c
+++ b/ext/libav/gstavviddec.c
@@ -106,7 +106,7 @@ struct _GstFFMpegVidDecClass
#define DEFAULT_SKIPFRAME 0
#define DEFAULT_DIRECT_RENDERING TRUE
#define DEFAULT_DEBUG_MV FALSE
-#define DEFAULT_MAX_THREADS 0
+#define DEFAULT_MAX_THREADS 1
enum
{
@@ -470,14 +470,30 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder,
* supports it) */
ffmpegdec->context->debug_mv = ffmpegdec->debug_mv;
- if (ffmpegdec->max_threads == 0) {
- if (!(oclass->in_plugin->capabilities & CODEC_CAP_AUTO_THREADS))
- ffmpegdec->context->thread_count = gst_ffmpeg_auto_max_threads ();
- else
- ffmpegdec->context->thread_count = 0;
- } else
- ffmpegdec->context->thread_count = ffmpegdec->max_threads;
+ {
+ const gchar *env = g_getenv ("GST_AVVIDDEC_MAX_THREADS");
+ int max_threads = ffmpegdec->max_threads;
+
+ if (env != NULL) {
+ if (g_str_equal (env, "auto"))
+ max_threads = 0;
+ else
+ max_threads = MAX (atoi (env), 0);
+
+ if (max_threads != 1) {
+ GST_WARNING_OBJECT (ffmpegdec, "max threads forced to %d, this might "
+ "lead to decoding errors or artefacts", max_threads);
+ }
+ }
+ if (max_threads == 0) {
+ if (!(oclass->in_plugin->capabilities & CODEC_CAP_AUTO_THREADS))
+ ffmpegdec->context->thread_count = gst_ffmpeg_auto_max_threads ();
+ else
+ ffmpegdec->context->thread_count = 0;
+ } else
+ ffmpegdec->context->thread_count = max_threads;
+ }
ffmpegdec->context->thread_type = FF_THREAD_SLICE;
/* open codec - we don't select an output pix_fmt yet,
diff --git a/gst-libav.doap b/gst-libav.doap
index a90b9c8..44ab96f 100644
--- a/gst-libav.doap
+++ b/gst-libav.doap
@@ -34,6 +34,16 @@ colorspace conversion elements.
<release>
<Version>
+ <revision>1.0.6</revision>
+ <branch>1.0</branch>
+ <name></name>
+ <created>2013-03-22</created>
+ <file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.0.6.tar.xz" />
+ </Version>
+ </release>
+
+ <release>
+ <Version>
<revision>1.0.5</revision>
<branch>1.0</branch>
<name></name>
diff --git a/gst-libav.spec b/gst-libav.spec
index 7ea58ab..4faddfb 100644
--- a/gst-libav.spec
+++ b/gst-libav.spec
@@ -4,7 +4,7 @@
%define gst_majorminor 1.0
Name: %{gstreamer}-libav
-Version: 1.0.5
+Version: 1.0.6
Release: 1
Summary: GStreamer Streaming-media framework plug-in using libav (FFmpeg).
Group: Libraries/Multimedia
diff --git a/gst-libs/ext/libav/.gitignore b/gst-libs/ext/libav/.gitignore
index 2118a51..478a1ee 100644
--- a/gst-libs/ext/libav/.gitignore
+++ b/gst-libs/ext/libav/.gitignore
@@ -35,6 +35,7 @@ tests/tiny_psnr
tests/videogen
tests/vsynth1
tests/vsynth2
+tools/aviocat
tools/cws2fws
tools/graph2dot
tools/lavfi-showfiltfmts
diff --git a/gst-libs/ext/libav/Changelog b/gst-libs/ext/libav/Changelog
index d3c743d..c851203 100644
--- a/gst-libs/ext/libav/Changelog
+++ b/gst-libs/ext/libav/Changelog
@@ -1,6 +1,25 @@
Entries are sorted chronologically from oldest to youngest within each release,
releases are sorted from youngest to oldest.
+version 0.8.5:
+
+- Several bugs and crashes have been fixed in the following codecs:
+ Indeo 4 (CVE-2012-2791), VP5/VP6 (CVE-2012-2783), Indeo 3 (CVE-2012-2804),
+ MPEG-1/2 (CVE-2012-2803), MP3 (CVE-2012-2797), AAC (CVE-2012-5144),
+ AC-3 (CVE-2012-2802), AVS (CVE-2012-2801), DFA (CVE-2012-2798)
+
+- backported hardening patches for h264 and svq3
+
+- smaller bug fixes in id3v2 (Bug 395), RTSP, option handling, ALAC,
+ Flash Screen Video
+
+- unconditionally enable PIC on PowerPC
+
+- x86: Require an assembler able to cope with AVX instructions
+
+- fix a serious memory leak on broken Ogg files
+
+
version 0.8.4:
- Several bugs and crashes have been fixed in the following codecs:
diff --git a/gst-libs/ext/libav/Makefile b/gst-libs/ext/libav/Makefile
index 19b8df4..96e3a87 100644
--- a/gst-libs/ext/libav/Makefile
+++ b/gst-libs/ext/libav/Makefile
@@ -172,7 +172,6 @@ uninstall-data:
clean::
$(RM) $(ALLPROGS)
$(RM) $(CLEANSUFFIXES)
- $(RM) $(TOOLS)
$(RM) $(CLEANSUFFIXES:%=tools/%)
distclean::
@@ -182,6 +181,8 @@ distclean::
config:
$(SRC_PATH)/configure $(value LIBAV_CONFIGURATION)
+check: all alltools checkheaders examples testprogs fate
+
include $(SRC_PATH)/doc/Makefile
include $(SRC_PATH)/tests/Makefile
@@ -196,5 +197,5 @@ $(sort $(OBJDIRS)):
# so this saves some time on slow systems.
.SUFFIXES:
-.PHONY: all all-yes alltools *clean config examples install*
+.PHONY: all all-yes alltools check *clean config examples install*
.PHONY: testprogs uninstall*
diff --git a/gst-libs/ext/libav/RELEASE b/gst-libs/ext/libav/RELEASE
index b60d719..7ada0d3 100644
--- a/gst-libs/ext/libav/RELEASE
+++ b/gst-libs/ext/libav/RELEASE
@@ -1 +1 @@
-0.8.4
+0.8.5
diff --git a/gst-libs/ext/libav/avconv.c b/gst-libs/ext/libav/avconv.c
index 34507d4..df86b2b 100644
--- a/gst-libs/ext/libav/avconv.c
+++ b/gst-libs/ext/libav/avconv.c
@@ -3101,6 +3101,8 @@ static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFor
METADATA_CHECK_INDEX(index, context->nb_programs, "program")\
meta = &context->programs[index]->metadata;\
break;\
+ case 's':\
+ break; /* handled separately below */ \
}\
SET_DICT(type_in, meta_in, ic, idx_in);
@@ -3468,8 +3470,6 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
char *bsf = NULL, *next, *codec_tag = NULL;
AVBitStreamFilterContext *bsfc, *bsfc_prev = NULL;
double qscale = -1;
- char *buf = NULL, *arg = NULL, *preset = NULL;
- AVIOContext *s = NULL;
if (!st) {
av_log(NULL, AV_LOG_FATAL, "Could not alloc stream.\n");
@@ -3488,37 +3488,40 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
st->codec->codec_type = type;
choose_encoder(o, oc, ost);
if (ost->enc) {
+ AVIOContext *s = NULL;
+ char *buf = NULL, *arg = NULL, *preset = NULL;
+
ost->opts = filter_codec_opts(codec_opts, ost->enc->id, oc, st);
+
+ MATCH_PER_STREAM_OPT(presets, str, preset, oc, st);
+ if (preset && (!(ret = get_preset_file_2(preset, ost->enc->name, &s)))) {
+ do {
+ buf = get_line(s);
+ if (!buf[0] || buf[0] == '#') {
+ av_free(buf);
+ continue;
+ }
+ if (!(arg = strchr(buf, '='))) {
+ av_log(NULL, AV_LOG_FATAL, "Invalid line found in the preset file.\n");
+ exit_program(1);
+ }
+ *arg++ = 0;
+ av_dict_set(&ost->opts, buf, arg, AV_DICT_DONT_OVERWRITE);
+ av_free(buf);
+ } while (!s->eof_reached);
+ avio_close(s);
+ }
+ if (ret) {
+ av_log(NULL, AV_LOG_FATAL,
+ "Preset %s specified for stream %d:%d, but could not be opened.\n",
+ preset, ost->file_index, ost->index);
+ exit_program(1);
+ }
}
avcodec_get_context_defaults3(st->codec, ost->enc);
st->codec->codec_type = type; // XXX hack, avcodec_get_context_defaults2() sets type to unknown for stream copy
- MATCH_PER_STREAM_OPT(presets, str, preset, oc, st);
- if (preset && (!(ret = get_preset_file_2(preset, ost->enc->name, &s)))) {
- do {
- buf = get_line(s);
- if (!buf[0] || buf[0] == '#') {
- av_free(buf);
- continue;
- }
- if (!(arg = strchr(buf, '='))) {
- av_log(NULL, AV_LOG_FATAL, "Invalid line found in the preset file.\n");
- exit_program(1);
- }
- *arg++ = 0;
- av_dict_set(&ost->opts, buf, arg, AV_DICT_DONT_OVERWRITE);
- av_free(buf);
- } while (!s->eof_reached);
- avio_close(s);
- }
- if (ret) {
- av_log(NULL, AV_LOG_FATAL,
- "Preset %s specified for stream %d:%d, but could not be opened.\n",
- preset, ost->file_index, ost->index);
- exit_program(1);
- }
-
ost->max_frames = INT64_MAX;
MATCH_PER_STREAM_OPT(max_frames, i64, ost->max_frames, oc, st);
diff --git a/gst-libs/ext/libav/common.mak b/gst-libs/ext/libav/common.mak
index d781ced..9193455 100644
--- a/gst-libs/ext/libav/common.mak
+++ b/gst-libs/ext/libav/common.mak
@@ -49,4 +49,13 @@ CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver
DISTCLEANSUFFIXES = *.pc
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp
+define RULES
+clean::
+ $(RM) $(OBJS) $(OBJS:.o=.d)
+ $(RM) $(HOSTPROGS)
+ $(RM) $(TOOLS)
+endef
+
+$(eval $(RULES))
+
-include $(wildcard $(OBJS:.o=.d) $(TESTOBJS:.o=.d))
diff --git a/gst-libs/ext/libav/configure b/gst-libs/ext/libav/configure
index 7ab97f6..dbaea0c 100755
--- a/gst-libs/ext/libav/configure
+++ b/gst-libs/ext/libav/configure
@@ -2392,7 +2392,7 @@ check_host_cflags -std=c99
check_host_cflags -Wall
case "$arch" in
- alpha|ia64|mips|parisc|sparc)
+ alpha|ia64|mips|parisc|ppc|sparc)
spic=$shared
;;
x86)
@@ -2785,9 +2785,8 @@ EOF
elf*) enabled debug && append YASMFLAGS $yasm_debug ;;
esac
- check_yasm "pextrd [eax], xmm0, 1" && enable yasm ||
+ check_yasm "vextractf128 xmm0, ymm0, 0" && enable yasm ||
die "yasm not found, use --disable-yasm for a crippled build"
- check_yasm "vextractf128 xmm0, ymm0, 0" || disable avx
fi
case "$cpu" in
diff --git a/gst-libs/ext/libav/doc/APIchanges b/gst-libs/ext/libav/doc/APIchanges
index 78e37f4..0b9cdac 100644
--- a/gst-libs/ext/libav/doc/APIchanges
+++ b/gst-libs/ext/libav/doc/APIchanges
@@ -13,17 +13,17 @@ libavutil: 2011-04-18
API changes, most recent first:
-2012-03-04 - xxxxxxx - lavu 51.22.1 - error.h
+2012-03-04 - 7f3f855 - lavu 51.22.1 - error.h
Add AVERROR_UNKNOWN
-2012-02-29 - xxxxxxx - lavf 53.21.0
+2012-02-29 - 2ad77c6 - lavf 53.21.1
Add avformat_get_riff_video_tags() and avformat_get_riff_audio_tags().
-2012-02-29 - xxxxxxx - lavu 51.22.0 - intfloat.h
+2012-02-29 - a1556d3 - lavu 51.22.0 - intfloat.h
Add a new installed header libavutil/intfloat.h with int/float punning
functions.
-2012-02-17 - xxxxxxx - lavc 53.35.0
+2012-02-17 - 350d06d - lavc 53.35.0
Add avcodec_is_open() function.
2012-01-15 - lavc 53.34.0
diff --git a/gst-libs/ext/libav/doc/developer.texi b/gst-libs/ext/libav/doc/developer.texi
index 046743f..c189de1 100644
--- a/gst-libs/ext/libav/doc/developer.texi
+++ b/gst-libs/ext/libav/doc/developer.texi
@@ -420,9 +420,7 @@ send a reminder by email. Your patch should eventually be dealt with.
@enumerate
@item
- Does @code{make fate} pass with the patch applied?
-@item
- Does @code{make checkheaders} pass with the patch applied?
+ Does @code{make check} pass with the patch applied?
@item
Is the patch against latest Libav git master branch?
@item
diff --git a/gst-libs/ext/libav/libavcodec/aacdec.c b/gst-libs/ext/libav/libavcodec/aacdec.c
index 2b9b45c..6478c77 100644
--- a/gst-libs/ext/libav/libavcodec/aacdec.c
+++ b/gst-libs/ext/libav/libavcodec/aacdec.c
@@ -1747,7 +1747,7 @@ static void apply_tns(float coef[1024], TemporalNoiseShaping *tns,
int w, filt, m, i;
int bottom, top, order, start, end, size, inc;
float lpc[TNS_MAX_ORDER];
- float tmp[TNS_MAX_ORDER];
+ float tmp[TNS_MAX_ORDER + 1];
for (w = 0; w < ics->num_windows; w++) {
bottom = ics->num_swb;
diff --git a/gst-libs/ext/libav/libavcodec/alac.c b/gst-libs/ext/libav/libavcodec/alac.c
index 278cc99..da78908 100644
--- a/gst-libs/ext/libav/libavcodec/alac.c
+++ b/gst-libs/ext/libav/libavcodec/alac.c
@@ -605,10 +605,9 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
alac->avctx = avctx;
/* initialize from the extradata */
- if (alac->avctx->extradata_size != ALAC_EXTRADATA_SIZE) {
- av_log(avctx, AV_LOG_ERROR, "alac: expected %d extradata bytes\n",
- ALAC_EXTRADATA_SIZE);
- return -1;
+ if (alac->avctx->extradata_size < ALAC_EXTRADATA_SIZE) {
+ av_log(avctx, AV_LOG_ERROR, "alac: extradata is too small\n");
+ return AVERROR_INVALIDDATA;
}
if (alac_set_info(alac)) {
av_log(avctx, AV_LOG_ERROR, "alac: set_info failed\n");
diff --git a/gst-libs/ext/libav/libavcodec/flacenc.c b/gst-libs/ext/libav/libavcodec/flacenc.c
index 94e381d..2bd4788 100644
--- a/gst-libs/ext/libav/libavcodec/flacenc.c
+++ b/gst-libs/ext/libav/libavcodec/flacenc.c
@@ -915,14 +915,16 @@ static int encode_residual_ch(FlacEncodeContext *s, int ch)
omethod == ORDER_METHOD_8LEVEL) {
int levels = 1 << omethod;
uint32_t bits[1 << ORDER_METHOD_8LEVEL];
- int order;
+ int order = -1;
int opt_index = levels-1;
opt_order = max_order-1;
bits[opt_index] = UINT32_MAX;
for (i = levels-1; i >= 0; i--) {
+ int last_order = order;
order = min_order + (((max_order-min_order+1) * (i+1)) / levels)-1;
- if (order < 0)
- order = 0;
+ order = av_clip(order, min_order - 1, max_order - 1);
+ if (order == last_order)
+ continue;
encode_residual_lpc(res, smp, n, order+1, coefs[order], shift[order]);
bits[i] = find_subframe_rice_params(s, sub, order+1);
if (bits[i] < bits[opt_index]) {
diff --git a/gst-libs/ext/libav/libavcodec/flashsv.c b/gst-libs/ext/libav/libavcodec/flashsv.c
index c99c21c..4a231ce 100644
--- a/gst-libs/ext/libav/libavcodec/flashsv.c
+++ b/gst-libs/ext/libav/libavcodec/flashsv.c
@@ -370,6 +370,11 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
}
if (has_diff) {
+ if (!s->keyframe) {
+ av_log(avctx, AV_LOG_ERROR,
+ "inter frame without keyframe\n");
+ return AVERROR_INVALIDDATA;
+ }
s->diff_start = get_bits(&gb, 8);
s->diff_height = get_bits(&gb, 8);
av_log(avctx, AV_LOG_DEBUG,
@@ -389,6 +394,11 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
av_log_missing_feature(avctx, "zlibprime_curr", 1);
return AVERROR_PATCHWELCOME;
}
+ if (!s->blocks && (s->zlibprime_curr || s->zlibprime_prev)) {
+ av_log(avctx, AV_LOG_ERROR, "no data available for zlib "
+ "priming\n");
+ return AVERROR_INVALIDDATA;
+ }
size--; // account for flags byte
}
diff --git a/gst-libs/ext/libav/libavcodec/h264.c b/gst-libs/ext/libav/libavcodec/h264.c
index d8d0a7d..f3a47fe 100644
--- a/gst-libs/ext/libav/libavcodec/h264.c
+++ b/gst-libs/ext/libav/libavcodec/h264.c
@@ -2866,7 +2866,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
h->mb_mbaff = 0;
h->mb_aff_frame = 0;
last_pic_structure = s0->picture_structure;
- last_pic_dropable = s->dropable;
+ last_pic_dropable = s0->dropable;
s->dropable = h->nal_ref_idc == 0;
if(h->sps.frame_mbs_only_flag){
s->picture_structure= PICT_FRAME;
@@ -2889,6 +2889,11 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
s->picture_structure = last_pic_structure;
s->dropable = last_pic_dropable;
return AVERROR_INVALIDDATA;
+ } else if (!s->current_picture_ptr) {
+ av_log(s->avctx, AV_LOG_ERROR,
+ "unset current_picture_ptr on %d. slice\n",
+ h0->current_slice + 1);
+ return AVERROR_INVALIDDATA;
}
} else {
/* Shorten frame num gaps so we don't have to allocate reference
@@ -3116,8 +3121,13 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
if(num_ref_idx_active_override_flag){
h->ref_count[0]= get_ue_golomb(&s->gb) + 1;
- if(h->slice_type_nos==AV_PICTURE_TYPE_B)
+ if (h->ref_count[0] < 1)
+ return AVERROR_INVALIDDATA;
+ if (h->slice_type_nos == AV_PICTURE_TYPE_B) {
h->ref_count[1]= get_ue_golomb(&s->gb) + 1;
+ if (h->ref_count[1] < 1)
+ return AVERROR_INVALIDDATA;
+ }
}
if (h->ref_count[0] > max_refs || h->ref_count[1] > max_refs) {
@@ -3760,9 +3770,10 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END&part_mask);
return 0;
- }else{
- ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_END&part_mask);
-
+ } else {
+ ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y,
+ s->mb_x - 1, s->mb_y,
+ ER_MB_END & part_mask);
return -1;
}
}
@@ -4007,6 +4018,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
hx->inter_gb_ptr= &hx->inter_gb;
if(hx->redundant_pic_count==0 && hx->intra_gb_ptr && hx->s.data_partitioning
+ && s->current_picture_ptr
&& s->context_initialized
&& (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc)
&& (avctx->skip_frame < AVDISCARD_BIDIR || hx->slice_type_nos!=AV_PICTURE_TYPE_B)
@@ -4029,9 +4041,16 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
ff_h264_decode_seq_parameter_set(h);
}
- if (s->flags& CODEC_FLAG_LOW_DELAY ||
- (h->sps.bitstream_restriction_flag && !h->sps.num_reorder_frames))
- s->low_delay=1;
+ if (s->flags & CODEC_FLAG_LOW_DELAY ||
+ (h->sps.bitstream_restriction_flag &&
+ !h->sps.num_reorder_frames)) {
+ if (s->avctx->has_b_frames > 1 || h->delayed_pic[0])
+ av_log(avctx, AV_LOG_WARNING, "Delayed frames seen "
+ "reenabling low delay requires a codec "
+ "flush.\n");
+ else
+ s->low_delay = 1;
+ }
if(avctx->has_b_frames < 2)
avctx->has_b_frames= !s->low_delay;
diff --git a/gst-libs/ext/libav/libavcodec/h264_ps.c b/gst-libs/ext/libav/libavcodec/h264_ps.c
index ff6103c..00c5003 100644
--- a/gst-libs/ext/libav/libavcodec/h264_ps.c
+++ b/gst-libs/ext/libav/libavcodec/h264_ps.c
@@ -37,6 +37,9 @@
//#undef NDEBUG
#include <assert.h>
+#define MAX_LOG2_MAX_FRAME_NUM (12 + 4)
+#define MIN_LOG2_MAX_FRAME_NUM 4
+
static const AVRational pixel_aspect[17]={
{0, 1},
{1, 1},
@@ -301,7 +304,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
MpegEncContext * const s = &h->s;
int profile_idc, level_idc, constraint_set_flags = 0;
unsigned int sps_id;
- int i;
+ int i, log2_max_frame_num_minus4;
SPS *sps;
profile_idc= get_bits(&s->gb, 8);
@@ -330,7 +333,11 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
memset(sps->scaling_matrix8, 16, sizeof(sps->scaling_matrix8));
sps->scaling_matrix_present = 0;
- if(sps->profile_idc >= 100){ //high profile
+ if (sps->profile_idc == 100 || sps->profile_idc == 110 ||
+ sps->profile_idc == 122 || sps->profile_idc == 244 ||
+ sps->profile_idc == 44 || sps->profile_idc == 83 ||
+ sps->profile_idc == 86 || sps->profile_idc == 118 ||
+ sps->profile_idc == 128 || sps->profile_idc == 144) {
sps->chroma_format_idc= get_ue_golomb_31(&s->gb);
if(sps->chroma_format_idc > 3) {
av_log(h->s.avctx, AV_LOG_ERROR, "chroma_format_idc (%u) out of range\n", sps->chroma_format_idc);
@@ -348,7 +355,16 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
sps->bit_depth_chroma = 8;
}
- sps->log2_max_frame_num= get_ue_golomb(&s->gb) + 4;
+ log2_max_frame_num_minus4 = get_ue_golomb(&s->gb);
+ if (log2_max_frame_num_minus4 < MIN_LOG2_MAX_FRAME_NUM - 4 ||
+ log2_max_frame_num_minus4 > MAX_LOG2_MAX_FRAME_NUM - 4) {
+ av_log(h->s.avctx, AV_LOG_ERROR,
+ "log2_max_frame_num_minus4 out of range (0-12): %d\n",
+ log2_max_frame_num_minus4);
+ return AVERROR_INVALIDDATA;
+ }
+ sps->log2_max_frame_num = log2_max_frame_num_minus4 + 4;
+
sps->poc_type= get_ue_golomb_31(&s->gb);
if(sps->poc_type == 0){ //FIXME #define
diff --git a/gst-libs/ext/libav/libavcodec/indeo3.c b/gst-libs/ext/libav/libavcodec/indeo3.c
index 294527e..48e5810 100644
--- a/gst-libs/ext/libav/libavcodec/indeo3.c
+++ b/gst-libs/ext/libav/libavcodec/indeo3.c
@@ -207,6 +207,7 @@ static av_cold void free_frame_buffers(Indeo3DecodeContext *ctx)
for (p = 0; p < 3; p++) {
av_freep(&ctx->planes[p].buffers[0]);
av_freep(&ctx->planes[p].buffers[1]);
+ ctx->planes[p].pixels[0] = ctx->planes[p].pixels[1] = 0;
}
}
@@ -344,8 +345,10 @@ if (*data_ptr >= last_ptr) \
fill_64(dst, pix64, num_lines << 1, row_offset)
#define APPLY_DELTA_4 \
- AV_WN16A(dst + line_offset , AV_RN16A(ref ) + delta_tab->deltas[dyad1]);\
- AV_WN16A(dst + line_offset + 2, AV_RN16A(ref + 2) + delta_tab->deltas[dyad2]);\
+ AV_WN16A(dst + line_offset ,\
+ (AV_RN16A(ref ) + delta_tab->deltas[dyad1]) & 0x7F7F);\
+ AV_WN16A(dst + line_offset + 2,\
+ (AV_RN16A(ref + 2) + delta_tab->deltas[dyad2]) & 0x7F7F);\
if (mode >= 3) {\
if (is_top_of_cell && !cell->ypos) {\
AV_COPY32(dst, dst + row_offset);\
@@ -358,14 +361,14 @@ if (*data_ptr >= last_ptr) \
/* apply two 32-bit VQ deltas to next even line */\
if (is_top_of_cell) { \
AV_WN32A(dst + row_offset , \
- replicate32(AV_RN32A(ref )) + delta_tab->deltas_m10[dyad1]);\
+ (replicate32(AV_RN32A(ref )) + delta_tab->deltas_m10[dyad1]) & 0x7F7F7F7F);\
AV_WN32A(dst + row_offset + 4, \
- replicate32(AV_RN32A(ref + 4)) + delta_tab->deltas_m10[dyad2]);\
+ (replicate32(AV_RN32A(ref + 4)) + delta_tab->deltas_m10[dyad2]) & 0x7F7F7F7F);\
} else { \
AV_WN32A(dst + row_offset , \
- AV_RN32A(ref ) + delta_tab->deltas_m10[dyad1]);\
+ (AV_RN32A(ref ) + delta_tab->deltas_m10[dyad1]) & 0x7F7F7F7F);\
AV_WN32A(dst + row_offset + 4, \
- AV_RN32A(ref + 4) + delta_tab->deltas_m10[dyad2]);\
+ (AV_RN32A(ref + 4) + delta_tab->deltas_m10[dyad2]) & 0x7F7F7F7F);\
} \
/* odd lines are not coded but rather interpolated/replicated */\
/* first line of the cell on the top of image? - replicate */\
@@ -379,22 +382,22 @@ if (*data_ptr >= last_ptr) \
#define APPLY_DELTA_1011_INTER \
if (mode == 10) { \
AV_WN32A(dst , \
- AV_RN32A(dst ) + delta_tab->deltas_m10[dyad1]);\
+ (AV_RN32A(dst ) + delta_tab->deltas_m10[dyad1]) & 0x7F7F7F7F);\
AV_WN32A(dst + 4 , \
- AV_RN32A(dst + 4 ) + delta_tab->deltas_m10[dyad2]);\
+ (AV_RN32A(dst + 4 ) + delta_tab->deltas_m10[dyad2]) & 0x7F7F7F7F);\
AV_WN32A(dst + row_offset , \
- AV_RN32A(dst + row_offset ) + delta_tab->deltas_m10[dyad1]);\
+ (AV_RN32A(dst + row_offset ) + delta_tab->deltas_m10[dyad1]) & 0x7F7F7F7F);\
AV_WN32A(dst + row_offset + 4, \
- AV_RN32A(dst + row_offset + 4) + delta_tab->deltas_m10[dyad2]);\
+ (AV_RN32A(dst + row_offset + 4) + delta_tab->deltas_m10[dyad2]) & 0x7F7F7F7F);\
} else { \
AV_WN16A(dst , \
- AV_RN16A(dst ) + delta_tab->deltas[dyad1]);\
+ (AV_RN16A(dst ) + delta_tab->deltas[dyad1]) & 0x7F7F);\
AV_WN16A(dst + 2 , \
- AV_RN16A(dst + 2 ) + delta_tab->deltas[dyad2]);\
+ (AV_RN16A(dst + 2 ) + delta_tab->deltas[dyad2]) & 0x7F7F);\
AV_WN16A(dst + row_offset , \
- AV_RN16A(dst + row_offset ) + delta_tab->deltas[dyad1]);\
+ (AV_RN16A(dst + row_offset ) + delta_tab->deltas[dyad1]) & 0x7F7F);\
AV_WN16A(dst + row_offset + 2, \
- AV_RN16A(dst + row_offset + 2) + delta_tab->deltas[dyad2]);\
+ (AV_RN16A(dst + row_offset + 2) + delta_tab->deltas[dyad2]) & 0x7F7F);\
}
diff --git a/gst-libs/ext/libav/libavcodec/ivi_common.c b/gst-libs/ext/libav/libavcodec/ivi_common.c
index db33767..84705c4 100644
--- a/gst-libs/ext/libav/libavcodec/ivi_common.c
+++ b/gst-libs/ext/libav/libavcodec/ivi_common.c
@@ -411,6 +411,11 @@ int ff_ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile)
}
if (cbp & 1) { /* block coded ? */
+ if (!band->scan) {
+ av_log(NULL, AV_LOG_ERROR, "Scan pattern is not set.\n");
+ return AVERROR_INVALIDDATA;
+ }
+
scan_pos = -1;
memset(trvec, 0, num_coeffs*sizeof(trvec[0])); /* zero transform vector */
memset(col_flags, 0, sizeof(col_flags)); /* zero column flags */
diff --git a/gst-libs/ext/libav/libavcodec/mpeg12.c b/gst-libs/ext/libav/libavcodec/mpeg12.c
index 65dfe47..436b4cf 100644
--- a/gst-libs/ext/libav/libavcodec/mpeg12.c
+++ b/gst-libs/ext/libav/libavcodec/mpeg12.c
@@ -2223,8 +2223,9 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
s->slice_count = 0;
- if (avctx->extradata && !avctx->frame_number) {
+ if (avctx->extradata && !s->extradata_decoded) {
int ret = decode_chunks(avctx, picture, data_size, avctx->extradata, avctx->extradata_size);
+ s->extradata_decoded = 1;
if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE))
return ret;
}
diff --git a/gst-libs/ext/libav/libavcodec/mpeg12.h b/gst-libs/ext/libav/libavcodec/mpeg12.h
index ab0352f..0f9faaf 100644
--- a/gst-libs/ext/libav/libavcodec/mpeg12.h
+++ b/gst-libs/ext/libav/libavcodec/mpeg12.h
@@ -42,6 +42,7 @@ typedef struct Mpeg1Context {
AVRational frame_rate_ext; ///< MPEG-2 specific framerate modificator
int sync; ///< Did we reach a sync point like a GOP/SEQ/KEYFrame?
int closed_gop; ///< GOP is closed
+ int extradata_decoded;
} Mpeg1Context;
extern uint8_t ff_mpeg12_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3];
diff --git a/gst-libs/ext/libav/libavcodec/mpegaudiodec.c b/gst-libs/ext/libav/libavcodec/mpegaudiodec.c
index bb1baef..cd0d26d 100644
--- a/gst-libs/ext/libav/libavcodec/mpegaudiodec.c
+++ b/gst-libs/ext/libav/libavcodec/mpegaudiodec.c
@@ -1632,7 +1632,7 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr,
int buf_size = avpkt->size;
MPADecodeContext *s = avctx->priv_data;
uint32_t header;
- int out_size;
+ int ret;
if (buf_size < HEADER_SIZE)
return AVERROR_INVALIDDATA;
@@ -1663,21 +1663,22 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr,
buf_size= s->frame_size;
}
- out_size = mp_decode_frame(s, NULL, buf, buf_size);
- if (out_size >= 0) {
+ ret = mp_decode_frame(s, NULL, buf, buf_size);
+ if (ret >= 0) {
*got_frame_ptr = 1;
*(AVFrame *)data = s->frame;
avctx->sample_rate = s->sample_rate;
//FIXME maybe move the other codec info stuff from above here too
} else {
av_log(avctx, AV_LOG_ERROR, "Error while decoding MPEG audio frame.\n");
- /* Only return an error if the bad frame makes up the whole packet.
- If there is more data in the packet, just consume the bad frame
- instead of returning an error, which would discard the whole
- packet. */
+ /* Only return an error if the bad frame makes up the whole packet or
+ * the error is related to buffer management.
+ * If there is more data in the packet, just consume the bad frame
+ * instead of returning an error, which would discard the whole
+ * packet. */
*got_frame_ptr = 0;
- if (buf_size == avpkt->size)
- return out_size;
+ if (buf_size == avpkt->size || ret != AVERROR_INVALIDDATA)
+ return ret;
}
s->frame_size = 0;
return buf_size;
@@ -1698,7 +1699,7 @@ static int decode_frame_adu(AVCodecContext *avctx, void *data,
int buf_size = avpkt->size;
MPADecodeContext *s = avctx->priv_data;
uint32_t header;
- int len, out_size;
+ int len, out_size, ret = 0;
len = buf_size;
@@ -1735,7 +1736,11 @@ static int decode_frame_adu(AVCodecContext *avctx, void *data,
out_size = buf_size;
else
#endif
- out_size = mp_decode_frame(s, NULL, buf, buf_size);
+ ret = mp_decode_frame(s, NULL, buf, buf_size);
+ if (ret < 0) {
+ av_log(avctx, AV_LOG_ERROR, "Error while decoding MPEG audio frame.\n");
+ return ret;
+ }
*got_frame_ptr = 1;
*(AVFrame *)data = s->frame;
@@ -1942,7 +1947,10 @@ static int decode_frame_mp3on4(AVCodecContext *avctx, void *data,
}
ch += m->nb_channels;
- out_size += mp_decode_frame(m, outptr, buf, fsize);
+ if ((ret = mp_decode_frame(m, outptr, buf, fsize)) < 0)
+ return ret;
+
+ out_size += ret;
buf += fsize;
len -= fsize;
diff --git a/gst-libs/ext/libav/libavcodec/svq3.c b/gst-libs/ext/libav/libavcodec/svq3.c
index 3be71a0..ebe4fd9 100644
--- a/gst-libs/ext/libav/libavcodec/svq3.c
+++ b/gst-libs/ext/libav/libavcodec/svq3.c
@@ -409,17 +409,17 @@ static inline int svq3_mc_dir(H264Context *h, int size, int mode, int dir,
int32_t mv = pack16to32(mx,my);
if (part_height == 8 && i < 8) {
- *(int32_t *) h->mv_cache[dir][scan8[k] + 1*8] = mv;
+ AV_WN32A(h->mv_cache[dir][scan8[k] + 1*8], mv);
if (part_width == 8 && j < 8) {
- *(int32_t *) h->mv_cache[dir][scan8[k] + 1 + 1*8] = mv;
+ AV_WN32A(h->mv_cache[dir][scan8[k] + 1 + 1*8], mv);
}
}
if (part_width == 8 && j < 8) {
- *(int32_t *) h->mv_cache[dir][scan8[k] + 1] = mv;
+ AV_WN32A(h->mv_cache[dir][scan8[k] + 1], mv);
}
if (part_width == 4 || part_height == 4) {
- *(int32_t *) h->mv_cache[dir][scan8[k]] = mv;
+ AV_WN32A(h->mv_cache[dir][scan8[k]], mv);
}
}
@@ -487,11 +487,11 @@ static int svq3_decode_mb(SVQ3Context *svq3, unsigned int mb_type)
for (m = 0; m < 2; m++) {
if (s->mb_x > 0 && h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - 1]+6] != -1) {
for (i = 0; i < 4; i++) {
- *(uint32_t *) h->mv_cache[m][scan8[0] - 1 + i*8] = *(uint32_t *) s->current_picture.f.motion_val[m][b_xy - 1 + i*h->b_stride];
+ AV_COPY32(h->mv_cache[m][scan8[0] - 1 + i*8], s->current_picture.f.motion_val[m][b_xy - 1 + i*h->b_stride]);
}
} else {
for (i = 0; i < 4; i++) {
- *(uint32_t *) h->mv_cache[m][scan8[0] - 1 + i*8] = 0;
+ AV_ZERO32(h->mv_cache[m][scan8[0] - 1 + i*8]);
}
}
if (s->mb_y > 0) {
@@ -499,14 +499,14 @@ static int svq3_decode_mb(SVQ3Context *svq3, unsigned int mb_type)
memset(&h->ref_cache[m][scan8[0] - 1*8], (h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - s->mb_stride]] == -1) ? PART_NOT_AVAILABLE : 1, 4);
if (s->mb_x < (s->mb_width - 1)) {
- *(uint32_t *) h->mv_cache[m][scan8[0] + 4 - 1*8] = *(uint32_t *) s->current_picture.f.motion_val[m][b_xy - h->b_stride + 4];
+ AV_COPY32(h->mv_cache[m][scan8[0] + 4 - 1*8], s->current_picture.f.motion_val[m][b_xy - h->b_stride + 4]);
h->ref_cache[m][scan8[0] + 4 - 1*8] =
(h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - s->mb_stride + 1]+6] == -1 ||
h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - s->mb_stride ] ] == -1) ? PART_NOT_AVAILABLE : 1;
}else
h->ref_cache[m][scan8[0] + 4 - 1*8] = PART_NOT_AVAILABLE;
if (s->mb_x > 0) {
- *(uint32_t *) h->mv_cache[m][scan8[0] - 1 - 1*8] = *(uint32_t *) s->current_picture.f.motion_val[m][b_xy - h->b_stride - 1];
+ AV_COPY32(h->mv_cache[m][scan8[0] - 1 - 1*8], s->current_picture.f.motion_val[m][b_xy - h->b_stride - 1]);
h->ref_cache[m][scan8[0] - 1 - 1*8] = (h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - s->mb_stride - 1]+3] == -1) ? PART_NOT_AVAILABLE : 1;
}else
h->ref_cache[m][scan8[0] - 1 - 1*8] = PART_NOT_AVAILABLE;
diff --git a/gst-libs/ext/libav/libavcodec/vp5.c b/gst-libs/ext/libav/libavcodec/vp5.c
index 1c6eaa9..05c399c 100644
--- a/gst-libs/ext/libav/libavcodec/vp5.c
+++ b/gst-libs/ext/libav/libavcodec/vp5.c
@@ -49,18 +49,18 @@ static int vp5_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
{
vp56_rac_gets(c, 8);
if(vp56_rac_gets(c, 5) > 5)
- return 0;
+ return AVERROR_INVALIDDATA;
vp56_rac_gets(c, 2);
if (vp56_rac_get(c)) {
av_log(s->avctx, AV_LOG_ERROR, "interlacing not supported\n");
- return 0;
+ return AVERROR_PATCHWELCOME;
}
rows = vp56_rac_gets(c, 8); /* number of stored macroblock rows */
cols = vp56_rac_gets(c, 8); /* number of stored macroblock cols */
if (!rows || !cols) {
av_log(s->avctx, AV_LOG_ERROR, "Invalid size %dx%d\n",
cols << 4, rows << 4);
- return 0;
+ return AVERROR_INVALIDDATA;
}
vp56_rac_gets(c, 8); /* number of displayed macroblock rows */
vp56_rac_gets(c, 8); /* number of displayed macroblock cols */
@@ -69,11 +69,11 @@ static int vp5_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
16*cols != s->avctx->coded_width ||
16*rows != s->avctx->coded_height) {
avcodec_set_dimensions(s->avctx, 16*cols, 16*rows);
- return 2;
+ return VP56_SIZE_CHANGE;
}
} else if (!s->macroblocks)
- return 0;
- return 1;
+ return AVERROR_INVALIDDATA;
+ return 0;
}
static void vp5_parse_vector_adjustment(VP56Context *s, VP56mv *vect)
diff --git a/gst-libs/ext/libav/libavcodec/vp56.c b/gst-libs/ext/libav/libavcodec/vp56.c
index 3b2ac95..7767461 100644
--- a/gst-libs/ext/libav/libavcodec/vp56.c
+++ b/gst-libs/ext/libav/libavcodec/vp56.c
@@ -513,10 +513,16 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
s->modelp = &s->models[is_alpha];
res = s->parse_header(s, buf, remaining_buf_size, &golden_frame);
- if (!res)
- return -1;
+ if (res < 0) {
+ int i;
+ for (i = 0; i < 4; i++) {
+ if (s->frames[i].data[0])
+ avctx->release_buffer(avctx, &s->frames[i]);
+ }
+ return res;
+ }
- if (res == 2) {
+ if (res == VP56_SIZE_CHANGE) {
int i;
for (i = 0; i < 4; i++) {
if (s->frames[i].data[0])
@@ -535,7 +541,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
return -1;
}
- if (res == 2)
+ if (res == VP56_SIZE_CHANGE)
if (vp56_size_changed(avctx)) {
avctx->release_buffer(avctx, p);
return -1;
diff --git a/gst-libs/ext/libav/libavcodec/vp56.h b/gst-libs/ext/libav/libavcodec/vp56.h
index 0607e0d..770b608 100644
--- a/gst-libs/ext/libav/libavcodec/vp56.h
+++ b/gst-libs/ext/libav/libavcodec/vp56.h
@@ -39,6 +39,8 @@ typedef struct {
int16_t y;
} DECLARE_ALIGNED(4, , VP56mv);
+#define VP56_SIZE_CHANGE 1
+
typedef void (*VP56ParseVectorAdjustment)(VP56Context *s,
VP56mv *vect);
typedef void (*VP56Filter)(VP56Context *s, uint8_t *dst, uint8_t *src,
diff --git a/gst-libs/ext/libav/libavcodec/vp6.c b/gst-libs/ext/libav/libavcodec/vp6.c
index 861a2da..faba49b 100644
--- a/gst-libs/ext/libav/libavcodec/vp6.c
+++ b/gst-libs/ext/libav/libavcodec/vp6.c
@@ -52,7 +52,7 @@ static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
int vrt_shift = 0;
int sub_version;
int rows, cols;
- int res = 1;
+ int res = 0;
int separated_coeff = buf[0] & 1;
s->framep[VP56_FRAME_CURRENT]->key_frame = !(buf[0] & 0x80);
@@ -61,11 +61,11 @@ static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
if (s->framep[VP56_FRAME_CURRENT]->key_frame) {
sub_version = buf[1] >> 3;
if (sub_version > 8)
- return 0;
+ return AVERROR_INVALIDDATA;
s->filter_header = buf[1] & 0x06;
if (buf[1] & 1) {
- av_log(s->avctx, AV_LOG_ERROR, "interlacing not supported\n");
- return 0;
+ av_log_missing_feature(s->avctx, "Interlacing", 0);
+ return AVERROR_PATCHWELCOME;
}
if (separated_coeff || !s->filter_header) {
coeff_offset = AV_RB16(buf+2) - 2;
@@ -79,7 +79,7 @@ static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
/* buf[5] is number of displayed macroblock cols */
if (!rows || !cols) {
av_log(s->avctx, AV_LOG_ERROR, "Invalid size %dx%d\n", cols << 4, rows << 4);
- return 0;
+ return AVERROR_INVALIDDATA;
}
if (!s->macroblocks || /* first frame */
@@ -90,7 +90,7 @@ static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
s->avctx->width -= s->avctx->extradata[0] >> 4;
s->avctx->height -= s->avctx->extradata[0] & 0x0F;
}
- res = 2;
+ res = VP56_SIZE_CHANGE;
}
ff_vp56_init_range_decoder(c, buf+6, buf_size-6);
@@ -102,7 +102,7 @@ static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
s->sub_version = sub_version;
} else {
if (!s->sub_version || !s->avctx->coded_width || !s->avctx->coded_height)
- return 0;
+ return AVERROR_INVALIDDATA;
if (separated_coeff || !s->filter_header) {
coeff_offset = AV_RB16(buf+1) - 2;
@@ -146,7 +146,7 @@ static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
if (buf_size < 0) {
if (s->framep[VP56_FRAME_CURRENT]->key_frame)
avcodec_set_dimensions(s->avctx, 0, 0);
- return 0;
+ return AVERROR_INVALIDDATA;
}
if (s->use_huffman) {
s->parse_coeff = vp6_parse_coeff_huffman;
diff --git a/gst-libs/ext/libav/libavcodec/vp8.c b/gst-libs/ext/libav/libavcodec/vp8.c
index 8338198..a16f5ca 100644
--- a/gst-libs/ext/libav/libavcodec/vp8.c
+++ b/gst-libs/ext/libav/libavcodec/vp8.c
@@ -318,6 +318,7 @@ static int decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_size)
memcpy(s->prob->pred8x8c , vp8_pred8x8c_prob_inter , sizeof(s->prob->pred8x8c));
memcpy(s->prob->mvc , vp8_mv_default_prob , sizeof(s->prob->mvc));
memset(&s->segmentation, 0, sizeof(s->segmentation));
+ memset(&s->lf_delta, 0, sizeof(s->lf_delta));
}
if (!s->macroblocks_base || /* first frame */
diff --git a/gst-libs/ext/libav/libavformat/id3v2.c b/gst-libs/ext/libav/libavformat/id3v2.c
index 6499872..a7d3549 100644
--- a/gst-libs/ext/libav/libavformat/id3v2.c
+++ b/gst-libs/ext/libav/libavformat/id3v2.c
@@ -502,21 +502,23 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
/* check for text tag or supported special meta tag */
} else if (tag[0] == 'T' || (extra_meta && (extra_func = get_extra_meta_func(tag, isv34)))) {
if (unsync || tunsync) {
- int i, j;
+ int64_t end = avio_tell(s->pb) + tlen;
+ uint8_t *b;
av_fast_malloc(&buffer, &buffer_size, tlen);
if (!buffer) {
av_log(s, AV_LOG_ERROR, "Failed to alloc %d bytes\n", tlen);
goto seek;
}
- for (i = 0, j = 0; i < tlen; i++, j++) {
- buffer[j] = avio_r8(s->pb);
- if (j > 0 && !buffer[j] && buffer[j - 1] == 0xff) {
- /* Unsynchronised byte, skip it */
- j--;
+ b = buffer;
+ while (avio_tell(s->pb) < end) {
+ *b++ = avio_r8(s->pb);
+ if (*(b - 1) == 0xff && avio_tell(s->pb) < end - 1) {
+ uint8_t val = avio_r8(s->pb);
+ *b++ = val ? val : avio_r8(s->pb);
}
}
- ffio_init_context(&pb, buffer, j, 0, NULL, NULL, NULL, NULL);
- tlen = j;
+ ffio_init_context(&pb, buffer, b - buffer, 0, NULL, NULL, NULL, NULL);
+ tlen = b - buffer;
pbx = &pb; // read from sync buffer
} else {
pbx = s->pb; // read straight from input
diff --git a/gst-libs/ext/libav/libavformat/oggdec.c b/gst-libs/ext/libav/libavformat/oggdec.c
index 36e2c45..3079685 100644
--- a/gst-libs/ext/libav/libavformat/oggdec.c
+++ b/gst-libs/ext/libav/libavformat/oggdec.c
@@ -70,8 +70,7 @@ static int ogg_save(AVFormatContext *s)
for (i = 0; i < ogg->nstreams; i++){
struct ogg_stream *os = ogg->streams + i;
- os->buf = av_malloc (os->bufsize);
- memset (os->buf, 0, os->bufsize);
+ os->buf = av_mallocz (os->bufsize + FF_INPUT_BUFFER_PADDING_SIZE);
memcpy (os->buf, ost->streams[i].buf, os->bufpos);
}
@@ -162,13 +161,18 @@ static int ogg_new_stream(AVFormatContext *s, uint32_t serial, int new_avstream)
AVStream *st;
struct ogg_stream *os;
- ogg->streams = av_realloc (ogg->streams,
- ogg->nstreams * sizeof (*ogg->streams));
+ os = av_realloc (ogg->streams, ogg->nstreams * sizeof (*ogg->streams));
+
+ if (!os)
+ return AVERROR(ENOMEM);
+
+ ogg->streams = os;
+
memset (ogg->streams + idx, 0, sizeof (*ogg->streams));
os = ogg->streams + idx;
os->serial = serial;
os->bufsize = DECODER_BUFFER_SIZE;
- os->buf = av_malloc(os->bufsize);
+ os->buf = av_malloc(os->bufsize + FF_INPUT_BUFFER_PADDING_SIZE);
os->header = -1;
if (new_avstream) {
@@ -186,7 +190,7 @@ static int ogg_new_stream(AVFormatContext *s, uint32_t serial, int new_avstream)
static int ogg_new_buf(struct ogg *ogg, int idx)
{
struct ogg_stream *os = ogg->streams + idx;
- uint8_t *nb = av_malloc(os->bufsize);
+ uint8_t *nb = av_malloc(os->bufsize + FF_INPUT_BUFFER_PADDING_SIZE);
int size = os->bufpos - os->pstart;
if(os->buf){
memcpy(nb, os->buf + os->pstart, size);
@@ -297,7 +301,9 @@ static int ogg_read_page(AVFormatContext *s, int *str)
}
if (os->bufsize - os->bufpos < size){
- uint8_t *nb = av_malloc (os->bufsize *= 2);
+ uint8_t *nb = av_malloc ((os->bufsize *= 2) + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!nb)
+ return AVERROR(ENOMEM);
memcpy (nb, os->buf, os->bufpos);
av_free (os->buf);
os->buf = nb;
@@ -311,6 +317,7 @@ static int ogg_read_page(AVFormatContext *s, int *str)
os->granule = gp;
os->flags = flags;
+ memset(os->buf + os->bufpos, 0, FF_INPUT_BUFFER_PADDING_SIZE);
if (str)
*str = idx;
@@ -494,15 +501,30 @@ static int ogg_get_length(AVFormatContext *s)
return 0;
}
-static int ogg_read_header(AVFormatContext *s, AVFormatParameters *ap)
+static int ogg_read_close(AVFormatContext *s)
+{
+ struct ogg *ogg = s->priv_data;
+ int i;
+
+ for (i = 0; i < ogg->nstreams; i++) {
+ av_free(ogg->streams[i].buf);
+ av_free(ogg->streams[i].private);
+ }
+ av_free(ogg->streams);
+ return 0;
+}
+
+static int ogg_read_header(AVFormatContext *s)
{
struct ogg *ogg = s->priv_data;
int ret, i;
ogg->curidx = -1;
//linear headers seek from start
ret = ogg_get_headers(s);
- if (ret < 0)
+ if (ret < 0) {
+ ogg_read_close(s);
return ret;
+ }
for (i = 0; i < ogg->nstreams; i++)
if (ogg->streams[i].header < 0)
@@ -587,19 +609,6 @@ retry:
return psize;
}
-static int ogg_read_close(AVFormatContext *s)
-{
- struct ogg *ogg = s->priv_data;
- int i;
-
- for (i = 0; i < ogg->nstreams; i++){
- av_free (ogg->streams[i].buf);
- av_free (ogg->streams[i].private);
- }
- av_free (ogg->streams);
- return 0;
-}
-
static int64_t ogg_read_timestamp(AVFormatContext *s, int stream_index,
int64_t *pos_arg, int64_t pos_limit)
{
diff --git a/gst-libs/ext/libav/libavformat/rtsp.c b/gst-libs/ext/libav/libavformat/rtsp.c
index 2858a9a..5a691f2 100644
--- a/gst-libs/ext/libav/libavformat/rtsp.c
+++ b/gst-libs/ext/libav/libavformat/rtsp.c
@@ -1711,6 +1711,7 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt)
rt->cur_transport_priv = NULL;
}
+redo:
if (rt->transport == RTSP_TRANSPORT_RTP) {
int i;
int64_t first_queue_time = 0;
@@ -1726,12 +1727,15 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt)
first_queue_st = rt->rtsp_streams[i];
}
}
- if (first_queue_time)
+ if (first_queue_time) {
wait_end = first_queue_time + s->max_delay;
+ } else {
+ wait_end = 0;
+ first_queue_st = NULL;
+ }
}
/* read next RTP packet */
- redo:
if (!rt->recvbuf) {
rt->recvbuf = av_malloc(RECVBUF_SIZE);
if (!rt->recvbuf)
diff --git a/gst-libs/ext/libav/libavformat/utils.c b/gst-libs/ext/libav/libavformat/utils.c
index 240cd94..9dc1dcb 100644
--- a/gst-libs/ext/libav/libavformat/utils.c
+++ b/gst-libs/ext/libav/libavformat/utils.c
@@ -838,7 +838,10 @@ static void compute_frame_duration(int *pnum, int *pden, AVStream *st,
*pnum = st->codec->time_base.num;
*pden = st->codec->time_base.den;
if (pc && pc->repeat_pict) {
- *pnum = (*pnum) * (1 + pc->repeat_pict);
+ if (*pnum > INT_MAX / (1 + pc->repeat_pict))
+ *pden /= 1 + pc->repeat_pict;
+ else
+ *pnum *= 1 + pc->repeat_pict;
}
//If this codec can be interlaced or progressive then we need a parser to compute duration of a packet
//Thus if we have no parser in such case leave duration undefined.
diff --git a/gst-libs/ext/libav/libavformat/version.h b/gst-libs/ext/libav/libavformat/version.h
index 009a60b..c0ca05a 100644
--- a/gst-libs/ext/libav/libavformat/version.h
+++ b/gst-libs/ext/libav/libavformat/version.h
@@ -31,7 +31,7 @@
#define LIBAVFORMAT_VERSION_MAJOR 53
#define LIBAVFORMAT_VERSION_MINOR 21
-#define LIBAVFORMAT_VERSION_MICRO 0
+#define LIBAVFORMAT_VERSION_MICRO 1
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
diff --git a/gst-libs/ext/libav/libavformat/yuv4mpeg.c b/gst-libs/ext/libav/libavformat/yuv4mpeg.c
index 09aabed..f68c1a7 100644
--- a/gst-libs/ext/libav/libavformat/yuv4mpeg.c
+++ b/gst-libs/ext/libav/libavformat/yuv4mpeg.c
@@ -155,6 +155,11 @@ static int yuv4_write_header(AVFormatContext *s)
if (s->nb_streams != 1)
return AVERROR(EIO);
+ if (s->streams[0]->codec->codec_id != CODEC_ID_RAWVIDEO) {
+ av_log(s, AV_LOG_ERROR, "ERROR: Only rawvideo supported.\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if (s->streams[0]->codec->pix_fmt == PIX_FMT_YUV411P) {
av_log(s, AV_LOG_ERROR, "Warning: generating rarely used 4:1:1 YUV "
"stream, some mjpegtools might not work.\n");
diff --git a/gst-libs/ext/libav/libavutil/opt.c b/gst-libs/ext/libav/libavutil/opt.c
index 7c53024..aea381e 100644
--- a/gst-libs/ext/libav/libavutil/opt.c
+++ b/gst-libs/ext/libav/libavutil/opt.c
@@ -57,8 +57,10 @@ const AVOption *av_next_option(void *obj, const AVOption *last)
const AVOption *av_opt_next(void *obj, const AVOption *last)
{
AVClass *class = *(AVClass**)obj;
- if (!last && class->option[0].name) return class->option;
- if (last && last[1].name) return ++last;
+ if (!last && class->option && class->option[0].name)
+ return class->option;
+ if (last && last[1].name)
+ return ++last;
return NULL;
}
diff --git a/gst-libs/ext/libav/library.mak b/gst-libs/ext/libav/library.mak
index f50e8e5..8dde8f4 100644
--- a/gst-libs/ext/libav/library.mak
+++ b/gst-libs/ext/libav/library.mak
@@ -47,8 +47,7 @@ $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver $(DEP_LIBS)
clean::
$(RM) $(addprefix $(SUBDIR),*-example$(EXESUF) *-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
- $(foreach dir,$(DIRS),$(CLEANSUFFIXES:%=$(SUBDIR)$(dir)/%)) \
- $(HOSTOBJS) $(HOSTPROGS)
+ $(foreach dir,$(DIRS),$(CLEANSUFFIXES:%=$(SUBDIR)$(dir)/%))
distclean:: clean
$(RM) $(DISTCLEANSUFFIXES:%=$(SUBDIR)%) \