diff --git a/INSTALL b/INSTALL
index b42a17ac4640e9a2bfe5e480e44d0eef3f365928..2099840756e6302d837dcd51b5dcd6262f7adb16 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,48 +1,80 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
+Inc.
+
+   Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without warranty of any kind.
+
 Basic Installation
 ==================
 
-   These are generic installation instructions.
+   Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.  Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below.  The lack of an optional feature in a given package is not
+necessarily a bug.  More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
 
    The `configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
 those values to create a `Makefile' in each directory of the package.
 It may also create one or more `.h' files containing system-dependent
 definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, a file
-`config.cache' that saves the results of its tests to speed up
-reconfiguring, and a file `config.log' containing compiler output
-(useful mainly for debugging `configure').
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
 
    If you need to do unusual things to compile the package, please try
 to figure out how `configure' could check whether to do them, and mail
 diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If at some point `config.cache'
-contains results you don't want to keep, you may remove or edit it.
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
 
-   The file `configure.in' is used to create `configure' by a program
-called `autoconf'.  You only need `configure.in' if you want to change
-it or regenerate `configure' using a newer version of `autoconf'.
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
 
-The simplest way to compile this package is:
+   The simplest way to compile this package is:
 
   1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.  If you're
-     using `csh' on an old version of System V, you might need to type
-     `sh ./configure' instead to prevent `csh' from trying to execute
-     `configure' itself.
+     `./configure' to configure the package for your system.
 
-     Running `configure' takes awhile.  While running, it prints some
-     messages telling which features it is checking for.
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
 
   2. Type `make' to compile the package.
 
   3. Optionally, type `make check' to run any self-tests that come with
-     the package.
+     the package, generally using the just-built uninstalled binaries.
 
   4. Type `make install' to install the programs and any data files and
-     documentation.
-
-  5. You can remove the program binaries and object files from the
+     documentation.  When installing into a prefix owned by root, it is
+     recommended that the package be configured and built as a regular
+     user, and only the `make install' phase executed with root
+     privileges.
+
+  5. Optionally, type `make installcheck' to repeat any self-tests, but
+     this time using the binaries in their final installed location.
+     This target does not install anything.  Running this target as a
+     regular user, particularly if the prior `make install' required
+     root privileges, verifies that the installation completed
+     correctly.
+
+  6. You can remove the program binaries and object files from the
      source code directory by typing `make clean'.  To also remove the
      files that `configure' created (so you can compile the package for
      a different kind of computer), type `make distclean'.  There is
@@ -51,62 +83,119 @@ The simplest way to compile this package is:
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
+  7. Often, you can also type `make uninstall' to remove the installed
+     files again.  In practice, not all packages have tested that
+     uninstallation works correctly, even though it is required by the
+     GNU Coding Standards.
+
+  8. Some packages, particularly those that use Automake, provide `make
+     distcheck', which can by used by developers to test that all other
+     targets like `make install' and `make uninstall' work correctly.
+     This target is generally not run by end users.
+
 Compilers and Options
 =====================
 
    Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  You can give `configure'
-initial values for variables by setting them in the environment.  Using
-a Bourne-compatible shell, you can do that on the command line like
-this:
-     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
 
-Or on systems that have the `env' program, you can do it like this:
-     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
 
 Compiling For Multiple Architectures
 ====================================
 
    You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
-own directory.  To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+own directory.  To do this, you can use GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
 the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
+source code in the directory that `configure' is in and in `..'.  This
+is known as a "VPATH" build.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
 
-   If you have to use a `make' that does not supports the `VPATH'
-variable, you have to compile the package for one architecture at a time
-in the source code directory.  After you have installed the package for
-one architecture, use `make distclean' before reconfiguring for another
-architecture.
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
 
 Installation Names
 ==================
 
-   By default, `make install' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc.  You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
 
    You can specify separate installation prefixes for
 architecture-specific files and architecture-independent files.  If you
-give `configure' the option `--exec-prefix=PATH', the package will use
-PATH as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
 
    In addition, if you use an unusual directory layout you can give
-options like `--bindir=PATH' to specify different values for particular
+options like `--bindir=DIR' to specify different values for particular
 kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
+you can set and what kinds of files go in them.  In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+   The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+   The first method involves providing an override variable for each
+affected directory.  For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'.  Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated.  The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the `DESTDIR' variable.  For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names.  The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters.  On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
 
    If the package supports it, you can cause programs to be installed
 with an extra prefix or suffix on their names by giving `configure' the
 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
 
-Optional Features
-=================
-
    Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
@@ -119,25 +208,80 @@ find the X include and library files automatically, but if it doesn't,
 you can use the `configure' options `--x-includes=DIR' and
 `--x-libraries=DIR' to specify their locations.
 
+   Some packages offer the ability to configure how verbose the
+execution of `make' will be.  For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved.  Use GNU `make'
+instead.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
 Specifying the System Type
 ==========================
 
-   There may be some features `configure' can not figure out
-automatically, but needs to determine by the type of host the package
-will run on.  Usually `configure' can figure that out, but if it prints
-a message saying it can not guess the host type, give it the
-`--host=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name with three fields:
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
      CPU-COMPANY-SYSTEM
 
-See the file `config.sub' for the possible values of each field.  If
+where SYSTEM can have one of these forms:
+
+     OS
+     KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
 `config.sub' isn't included in this package, then this package doesn't
-need to know the host type.
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
 
-   If you are building compiler tools for cross-compiling, you can also
-use the `--target=TYPE' option to select the type of system they will
-produce code for and the `--build=TYPE' option to select the type of
-system on which you are compiling the package.
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
 
 Sharing Defaults
 ================
@@ -150,19 +294,56 @@ default values for variables like `CC', `cache_file', and `prefix'.
 `CONFIG_SITE' environment variable to the location of the site script.
 A warning: not all `configure' scripts look for a site script.
 
-Operation Controls
+Defining Variables
 ==================
 
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf limitation.  Until the limitation is lifted, you can use
+this workaround:
+
+     CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
    `configure' recognizes the following options to control how it
 operates.
 
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
 `--cache-file=FILE'
-     Use and save the results of the tests in FILE instead of
-     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
-     debugging `configure'.
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
 
-`--help'
-     Print a summary of the options to `configure', and exit.
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
 
 `--quiet'
 `--silent'
@@ -175,8 +356,15 @@ operates.
      Look for the package's source code in directory DIR.  Usually
      `configure' can determine that directory automatically.
 
-`--version'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
 
-`configure' also accepts some other, not widely useful, options.
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
diff --git a/autogen.sh b/autogen.sh
index 632b0253b6a825e7cb4b9ee58d1a18092f93076c..01d3fdab9f76a294753f24283da45c9b40779671 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -57,24 +57,13 @@ autogen_options $@
 
 printf "+ check for build tools"
 if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else  echo; fi
-version_check "autoconf" "$AUTOCONF autoconf autoconf270 autoconf269 autoconf268 " \
+version_check "autoreconf" "autoreconf " \
               "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 68 || DIE=1
-version_check "automake" "$AUTOMAKE automake automake-1.11" \
-              "ftp://ftp.gnu.org/pub/gnu/automake/" 1 11 || DIE=1
-version_check "autopoint" "autopoint" \
-              "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 17 || DIE=1
-version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
-              "ftp://ftp.gnu.org/pub/gnu/libtool/" 2 2 6 || DIE=1
 version_check "pkg-config" "" \
               "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
 
 die_check $DIE
 
-aclocal_check || DIE=1
-autoheader_check || DIE=1
-
-die_check $DIE
-
 # if no arguments specified then this will be printed
 if test -z "$*" && test -z "$NOCONFIGURE"; then
   echo "+ checking for autogen.sh options"
@@ -88,22 +77,13 @@ toplevel_check $srcfile
 
 # autopoint
 if test -d po ; then
-  tool_run "$autopoint" "--force"
+  tool_run "autopoint" "--force"
 fi
 
 # aclocal
 if test -f acinclude.m4; then rm acinclude.m4; fi
 
-tool_run "$libtoolize" "--copy --force"
-tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
-tool_run "$autoheader"
-
-# touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode
-echo timestamp > stamp-h.in 2> /dev/null
-
-tool_run "$autoconf"
-debug "automake: $automake"
-tool_run "$automake" "--add-missing --copy"
+autoreconf --force --install || exit 1
 
 test -n "$NOCONFIGURE" && {
   echo "+ skipping configure stage for package $package, as requested."
diff --git a/common/check.mak b/common/check.mak
index efd545876a9757f998d9119133bf0b5d0725aae3..8a90b5dd1b9b6a8c064aa87cbb46318d2b186811 100644
--- a/common/check.mak
+++ b/common/check.mak
@@ -16,38 +16,38 @@ LOOPS ?= 10
 # run any given test by running make test.check
 # if the test fails, run it again at at least debug level 2
 %.check: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$* ||							\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	GST_DEBUG=$$GST_DEBUG,*:2				\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*
 
 # just like 'check', but don't run it again if it fails (useful for debugging)
 %.check-norepeat: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*
 
 # run any given test in a loop
 %.torture: %
 	@for i in `seq 1 $(LOOPS)`; do				\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*; done
 
 # run any given test in an infinite loop
 %.forever: %
 	@while true; do						\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$* || break; done
 
 # valgrind any given test by running make test.valgrind
 %.valgrind: %
 	@valgrind_log=$(subst /,-,$*-valgrind.log);		\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=360					\
 	G_SLICE=always-malloc					\
 	$(LIBTOOL) --mode=execute				\
@@ -65,7 +65,7 @@ LOOPS ?= 10
 
 # valgrind any given test and generate suppressions for it
 %.valgrind.gen-suppressions: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=360					\
 	G_SLICE=always-malloc					\
 	$(LIBTOOL) --mode=execute				\
@@ -95,7 +95,7 @@ LOOPS ?= 10
 
 # gdb any given test by running make test.gdb
 %.gdb: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_FORK=no						\
 	$(LIBTOOL) --mode=execute				\
 	gdb $*
@@ -205,7 +205,7 @@ valgrind.gen-suppressions: $(TESTS)
 GST_INSPECT = $(GST_TOOLS_DIR)/gst-inspect-$(GST_API_VERSION)
 inspect:
 	@echo "Inspecting features ..."
-	@for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 	\
+	@for e in `$(AM_TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 	\
 	  | cut -d: -f2`;						\
 	  do echo Inspecting $$e;					\
 	     $(GST_INSPECT) $$e > /dev/null 2>&1; done
diff --git a/common/gst-autogen.sh b/common/gst-autogen.sh
index 78cab66fde123947a32fb39ac36c5171ba599b31..c5798d0b7ec9e002a43a864ece13b9ee7afeae1a 100644
--- a/common/gst-autogen.sh
+++ b/common/gst-autogen.sh
@@ -169,54 +169,6 @@ version_check ()
   return 1;
 }
 
-aclocal_check ()
-{
-  # normally aclocal is part of automake
-  # so we expect it to be in the same place as automake
-  # so if a different automake is supplied, we need to adapt as well
-  # so how's about replacing automake with aclocal in the set var,
-  # and saving that in $aclocal ?
-  # note, this will fail if the actual automake isn't called automake*
-  # or if part of the path before it contains it
-  if [ -z "$automake" ]; then
-    echo "Error: no automake variable set !"
-    return 1
-  else
-    aclocal=`echo $automake | sed s/automake/aclocal/`
-    debug "aclocal: $aclocal"
-    if [ "$aclocal" != "aclocal" ];
-    then
-      CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-aclocal=$aclocal"
-    fi
-    if [ ! -x `which $aclocal` ]; then
-      echo "Error: cannot execute $aclocal !"
-      return 1
-    fi
-  fi
-}
-
-autoheader_check ()
-{
-  # same here - autoheader is part of autoconf
-  # use the same voodoo
-  if [ -z "$autoconf" ]; then
-    echo "Error: no autoconf variable set !"
-    return 1
-  else
-    autoheader=`echo $autoconf | sed s/autoconf/autoheader/`
-    debug "autoheader: $autoheader"
-    if [ "$autoheader" != "autoheader" ];
-    then
-      CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-autoheader=$autoheader"
-    fi
-    if [ ! -x `which $autoheader` ]; then
-      echo "Error: cannot execute $autoheader !"
-      return 1
-    fi
-  fi
-
-}
-
 die_check ()
 {
   # call with $DIE
diff --git a/common/gst.supp b/common/gst.supp
index c08f660fd749e336724292bb97f6363bb6663770..5e2aaf92b54c03d6dba2b0b9935e025b44db7be4 100644
--- a/common/gst.supp
+++ b/common/gst.supp
@@ -3972,3 +3972,37 @@
   timer_create(evp)
   fun:timer_create@@GLIBC_2.3.3
 }
+
+{
+   closures aren't valgrind friendly (bgo#739850)
+   Memcheck:Leak
+   match-leak-kinds: possible
+   fun:calloc
+   ...
+   fun:g_cclosure_new
+}
+
+{
+   closures aren't valgrind friendly (bgo#739850)
+   Memcheck:Leak
+   match-leak-kinds: possible
+   fun:malloc
+   ...
+   fun:g_closure_add_invalidate_notifier
+}
+
+{
+   closures aren't valgrind friendly (bgo#739850)
+   Memcheck:Leak
+   match-leak-kinds: possible
+   fun:calloc
+   ...
+   fun:g_closure_new_simple
+}
+
+{
+   glib/giomodules2 (from libsoup.supp)
+   Memcheck:Leak
+   ...
+   fun:_g_io_module_get_default
+}
diff --git a/configure.ac b/configure.ac
index 9a286c2b778072180b54ff67e1e23b127faf85e7..97632748dcb01b4a0ef84e37711edb0c252f143f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_PREREQ([2.68])
+AC_PREREQ([2.69])
 
 dnl please read gstreamer/docs/random/autotools before changing this file
 
@@ -10,7 +10,7 @@ AC_INIT([GStreamer Good Plug-ins],[1.5.0.1],[http://bugzilla.gnome.org/enter_bug
 AG_GST_INIT
 
 dnl initialize automake
-AM_INIT_AUTOMAKE([-Wno-portability 1.11 no-dist-gzip dist-xz tar-ustar subdir-objects])
+AM_INIT_AUTOMAKE([-Wno-portability 1.14 no-dist-gzip dist-xz tar-ustar subdir-objects])
 
 dnl define PACKAGE_VERSION_* variables
 AS_VERSION
diff --git a/docs/plugins/gst-plugins-good-plugins-sections.txt b/docs/plugins/gst-plugins-good-plugins-sections.txt
index ac6b4aa10a965f6b19ea296ae8dfdf6a62828b95..7a9dcc82f1366abfb265d826db3fe0df9d35ff8e 100644
--- a/docs/plugins/gst-plugins-good-plugins-sections.txt
+++ b/docs/plugins/gst-plugins-good-plugins-sections.txt
@@ -904,6 +904,8 @@ GST_IS_GOOM_CLASS
 <FILE>element-rtpbin</FILE>
 <TITLE>rtpbin</TITLE>
 GstRtpBin
+RTPJitterBufferMode
+GstRTCPSync
 <SUBSECTION Standard>
 GstRtpBinPrivate
 GstRtpBinClass
diff --git a/docs/plugins/html/gst-plugins-good-plugins-1.0.devhelp2 b/docs/plugins/html/gst-plugins-good-plugins-1.0.devhelp2
index d18a6364177849f726d30fc4a2698027e765e29d..a2adc677bf106da123430d655dc85856be19a111 100644
--- a/docs/plugins/html/gst-plugins-good-plugins-1.0.devhelp2
+++ b/docs/plugins/html/gst-plugins-good-plugins-1.0.devhelp2
@@ -775,9 +775,9 @@
     <keyword type="" name="Element Information" link="gst-plugins-good-plugins-mulawenc.html#id-1.2.82.7.2.1.1"/>
     <keyword type="" name="Element Pads" link="gst-plugins-good-plugins-mulawenc.html#id-1.2.82.7.2.1.2"/>
     <keyword type="struct" name="struct GstMuLawEnc" link="gst-plugins-good-plugins-mulawenc.html#GstMuLawEnc-struct"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-good-plugins-multifilesink.html#id-1.2.83.7.9"/>
-    <keyword type="" name="Element Information" link="gst-plugins-good-plugins-multifilesink.html#id-1.2.83.7.10.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-good-plugins-multifilesink.html#id-1.2.83.7.10.2"/>
+    <keyword type="" name="Example launch line" link="gst-plugins-good-plugins-multifilesink.html#id-1.2.83.7.11"/>
+    <keyword type="" name="Element Information" link="gst-plugins-good-plugins-multifilesink.html#id-1.2.83.7.12.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-good-plugins-multifilesink.html#id-1.2.83.7.12.2"/>
     <keyword type="struct" name="struct GstMultiFileSink" link="gst-plugins-good-plugins-multifilesink.html#GstMultiFileSink-struct"/>
     <keyword type="enum" name="enum GstMultiFileSinkNext" link="gst-plugins-good-plugins-multifilesink.html#GstMultiFileSinkNext"/>
     <keyword type="property" name="The “location” property" link="gst-plugins-good-plugins-multifilesink.html#GstMultiFileSink--location"/>
@@ -1099,6 +1099,8 @@
     <keyword type="" name="Element Information" link="gst-plugins-good-plugins-rtpbin.html#id-1.2.124.9.13.1"/>
     <keyword type="" name="Element Pads" link="gst-plugins-good-plugins-rtpbin.html#id-1.2.124.9.13.2"/>
     <keyword type="struct" name="struct GstRtpBin" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-struct"/>
+    <keyword type="enum" name="enum RTPJitterBufferMode" link="gst-plugins-good-plugins-rtpbin.html#RTPJitterBufferMode"/>
+    <keyword type="enum" name="enum GstRTCPSync" link="gst-plugins-good-plugins-rtpbin.html#GstRTCPSync"/>
     <keyword type="property" name="The “do-lost” property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--do-lost"/>
     <keyword type="property" name="The “latency” property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--latency"/>
     <keyword type="property" name="The “sdes” property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--sdes"/>
diff --git a/docs/plugins/html/gst-plugins-good-plugins-amrparse.html b/docs/plugins/html/gst-plugins-good-plugins-amrparse.html
index 27bf1754b38218d489168bc438b99250f0a9a5a5..49821dc78766e1f81ecaceb01d614c857af8ec7f 100644
--- a/docs/plugins/html/gst-plugins-good-plugins-amrparse.html
+++ b/docs/plugins/html/gst-plugins-good-plugins-amrparse.html
@@ -188,7 +188,7 @@ formats.</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-good-plugins-amrparse.see-also"></a><h2>See Also</h2>
-<p><span class="type">GstAmrnbDec</span>, <span class="type">GstAmrnbEnc</span></p>
+<p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-ugly/html/gst-plugins-ugly-plugins-amrnbdec.html#GstAmrnbDec"><span class="type">GstAmrnbDec</span></a>, <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-ugly/html/gst-plugins-ugly-plugins-amrnbenc.html#GstAmrnbEnc"><span class="type">GstAmrnbEnc</span></a></p>
 </div>
 </div>
 <div class="footer">
diff --git a/docs/plugins/html/gst-plugins-good-plugins-audioamplify.html b/docs/plugins/html/gst-plugins-good-plugins-audioamplify.html
index e19273416beaea75056214be1a6d0d541e48d2b2..705e4d9945abecb0051170091807cbe9dabf1d07 100644
--- a/docs/plugins/html/gst-plugins-good-plugins-audioamplify.html
+++ b/docs/plugins/html/gst-plugins-good-plugins-audioamplify.html
@@ -93,8 +93,8 @@ The difference between the clipping modes is best evaluated by testing.</p>
 2
 3</pre></td>
         <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> audiotestsrc wave<span class="gtkdoc opt">=</span>saw <span class="gtkdoc opt">!</span> audioamplify amplification<span class="gtkdoc opt">=</span><span class="number">1.5</span> <span class="gtkdoc opt">!</span> alsasink
-gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> filesrc location<span class="gtkdoc opt">=</span><span class="string">&quot;melo1.ogg&quot;</span> <span class="gtkdoc opt">!</span> oggdemux <span class="gtkdoc opt">!</span> vorbisdec <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audioamplify amplification<span class="gtkdoc opt">=</span><span class="number">1.5</span> method<span class="gtkdoc opt">=</span>wrap<span class="gtkdoc opt">-</span>negative <span class="gtkdoc opt">!</span> alsasink
-gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> audiotestsrc wave<span class="gtkdoc opt">=</span>saw <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audioamplify amplification<span class="gtkdoc opt">=</span><span class="number">1.5</span> method<span class="gtkdoc opt">=</span>wrap<span class="gtkdoc opt">-</span>positive <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> alsasink</pre></td>
+gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> filesrc location<span class="gtkdoc opt">=</span><span class="string">&quot;melo1.ogg&quot;</span> <span class="gtkdoc opt">!</span> oggdemux <span class="gtkdoc opt">!</span> vorbisdec <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audioamplify amplification<span class="gtkdoc opt">=</span><span class="number">1.5</span> clipping<span class="gtkdoc opt">-</span>method<span class="gtkdoc opt">=</span>wrap<span class="gtkdoc opt">-</span>negative <span class="gtkdoc opt">!</span> alsasink
+gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> audiotestsrc wave<span class="gtkdoc opt">=</span>saw <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audioamplify amplification<span class="gtkdoc opt">=</span><span class="number">1.5</span> clipping<span class="gtkdoc opt">-</span>method<span class="gtkdoc opt">=</span>wrap<span class="gtkdoc opt">-</span>positive <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> alsasink</pre></td>
       </tr>
     </tbody>
   </table>
diff --git a/docs/plugins/html/gst-plugins-good-plugins-audiodynamic.html b/docs/plugins/html/gst-plugins-good-plugins-audiodynamic.html
index 82de0483f46b4c1e19e325e97a0a67b2b18f24e2..1f62bdb1aa364a8df472ba750a27798bcd55bff7 100644
--- a/docs/plugins/html/gst-plugins-good-plugins-audiodynamic.html
+++ b/docs/plugins/html/gst-plugins-good-plugins-audiodynamic.html
@@ -104,8 +104,8 @@ soft-knee mode is selected the ratio is applied smoothly.</p>
         <td class="listing_lines" align="right"><pre>1
 2
 3</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> audiotestsrc wave<span class="gtkdoc opt">=</span>saw <span class="gtkdoc opt">!</span> audiodynamic characteristics<span class="gtkdoc opt">=</span>soft<span class="gtkdoc opt">-</span>knee mode<span class="gtkdoc opt">=</span>compressor threshold<span class="gtkdoc opt">=</span><span class="number">0.5</span> rate<span class="gtkdoc opt">=</span><span class="number">0.5</span> <span class="gtkdoc opt">!</span> alsasink
-gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> filesrc location<span class="gtkdoc opt">=</span><span class="string">&quot;melo1.ogg&quot;</span> <span class="gtkdoc opt">!</span> oggdemux <span class="gtkdoc opt">!</span> vorbisdec <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audiodynamic characteristics<span class="gtkdoc opt">=</span>hard<span class="gtkdoc opt">-</span>knee mode<span class="gtkdoc opt">=</span>expander threshold<span class="gtkdoc opt">=</span><span class="number">0.2</span> rate<span class="gtkdoc opt">=</span><span class="number">4.0</span> <span class="gtkdoc opt">!</span> alsasink
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> audiotestsrc wave<span class="gtkdoc opt">=</span>saw <span class="gtkdoc opt">!</span> audiodynamic characteristics<span class="gtkdoc opt">=</span>soft<span class="gtkdoc opt">-</span>knee mode<span class="gtkdoc opt">=</span>compressor threshold<span class="gtkdoc opt">=</span><span class="number">0.5</span> ratio<span class="gtkdoc opt">=</span><span class="number">0.5</span> <span class="gtkdoc opt">!</span> alsasink
+gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> filesrc location<span class="gtkdoc opt">=</span><span class="string">&quot;melo1.ogg&quot;</span> <span class="gtkdoc opt">!</span> oggdemux <span class="gtkdoc opt">!</span> vorbisdec <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audiodynamic characteristics<span class="gtkdoc opt">=</span>hard<span class="gtkdoc opt">-</span>knee mode<span class="gtkdoc opt">=</span>expander threshold<span class="gtkdoc opt">=</span><span class="number">0.2</span> ratio<span class="gtkdoc opt">=</span><span class="number">4.0</span> <span class="gtkdoc opt">!</span> alsasink
 gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> audiotestsrc wave<span class="gtkdoc opt">=</span>saw <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audiodynamic <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> alsasink</pre></td>
       </tr>
     </tbody>
diff --git a/docs/plugins/html/gst-plugins-good-plugins-multifilesink.html b/docs/plugins/html/gst-plugins-good-plugins-multifilesink.html
index 146f3d84458dea9c0ad0c5d70691dcb2a1942de7..2a80d570fe1bfef952a07b0d22dfdd57415e6abc 100644
--- a/docs/plugins/html/gst-plugins-good-plugins-multifilesink.html
+++ b/docs/plugins/html/gst-plugins-good-plugins-multifilesink.html
@@ -108,6 +108,12 @@
 <div class="refsect1">
 <a name="gst-plugins-good-plugins-multifilesink.description"></a><h2>Description</h2>
 <p>Write incoming data to a series of sequentially-named files.</p>
+<p>This element is usually used with data where each buffer is an
+independent unit of data in its own right (e.g. raw video buffers or
+encoded JPEG or PNG images) or with streamable container formats such
+as MPEG-TS or MPEG-PS.</p>
+<p>It is not possible to use this element to create independently playable
+mp4 files, use the splitmuxsink element for that instead.</p>
 <p>The filename property should contain a string with a %d placeholder that will
 be substituted with the index for each filename.</p>
 <p>If the <a class="link" href="gst-plugins-good-plugins-multifilesink.html#GstMultiFileSink--post-messages" title="The “post-messages” property"><span class="type">“post-messages”</span></a> property is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a>, it sends an application
@@ -158,7 +164,7 @@ message named</p>
   </p></li>
 </ul></div>
 <div class="refsect2">
-<a name="id-1.2.83.7.9"></a><h3>Example launch line</h3>
+<a name="id-1.2.83.7.11"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -176,7 +182,7 @@ gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.83.7.10.1"></a><h3>Element Information</h3>
+<a name="id-1.2.83.7.12.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -202,7 +208,7 @@ gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.83.7.10.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.83.7.12.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
diff --git a/docs/plugins/html/gst-plugins-good-plugins-qtdemux.html b/docs/plugins/html/gst-plugins-good-plugins-qtdemux.html
index 397c9ffa03132204ab1ea52bce7023caae56f246..9005630399f3161c7561508ca2d3f45bb16d3933 100644
--- a/docs/plugins/html/gst-plugins-good-plugins-qtdemux.html
+++ b/docs/plugins/html/gst-plugins-good-plugins-qtdemux.html
@@ -82,7 +82,7 @@ capabilities of the upstream elements.</p>
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> filesrc location<span class="gtkdoc opt">=</span>test<span class="gtkdoc opt">.</span>mov <span class="gtkdoc opt">!</span> qtdemux name<span class="gtkdoc opt">=</span>demux  demux<span class="gtkdoc opt">.</span>audio_0 <span class="gtkdoc opt">!</span> decodebin <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audioresample <span class="gtkdoc opt">!</span> autoaudiosink   demux<span class="gtkdoc opt">.</span>video_0 <span class="gtkdoc opt">!</span> queue <span class="gtkdoc opt">!</span> decodebin <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> videoscale <span class="gtkdoc opt">!</span> autovideosink</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> filesrc location<span class="gtkdoc opt">=</span>test<span class="gtkdoc opt">.</span>mov <span class="gtkdoc opt">!</span> qtdemux name<span class="gtkdoc opt">=</span>demux  demux<span class="gtkdoc opt">.</span>audio_0 <span class="gtkdoc opt">!</span> queue <span class="gtkdoc opt">!</span> decodebin <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audioresample <span class="gtkdoc opt">!</span> autoaudiosink   demux<span class="gtkdoc opt">.</span>video_0 <span class="gtkdoc opt">!</span> queue <span class="gtkdoc opt">!</span> decodebin <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> videoscale <span class="gtkdoc opt">!</span> autovideosink</pre></td>
       </tr>
     </tbody>
   </table>
diff --git a/docs/plugins/html/gst-plugins-good-plugins-rtpL16depay.html b/docs/plugins/html/gst-plugins-good-plugins-rtpL16depay.html
index 045a39a7668474ed6bd51b03212d7064112fb562..d245e97e0360c90a70f67128df6f731bfdf25913 100644
--- a/docs/plugins/html/gst-plugins-good-plugins-rtpL16depay.html
+++ b/docs/plugins/html/gst-plugins-good-plugins-rtpL16depay.html
@@ -66,7 +66,7 @@ For detailed information see: http://www.rfc-editor.org/rfc/rfc3551.txt</p>
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch udpsrc caps<span class="gtkdoc opt">=</span><span class="string">'application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1, payload=(int)96'</span> <span class="gtkdoc opt">!</span> rtpL16depay <span class="gtkdoc opt">!</span> pulsesink</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> udpsrc caps<span class="gtkdoc opt">=</span><span class="string">'application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1, payload=(int)96'</span> <span class="gtkdoc opt">!</span> rtpL16depay <span class="gtkdoc opt">!</span> pulsesink</pre></td>
       </tr>
     </tbody>
   </table>
diff --git a/docs/plugins/html/gst-plugins-good-plugins-rtpL16pay.html b/docs/plugins/html/gst-plugins-good-plugins-rtpL16pay.html
index b4f19882eab35522b8f823e674660751b0716c81..7e29fe04f39870150d8a002e27fc49ef49df4c6a 100644
--- a/docs/plugins/html/gst-plugins-good-plugins-rtpL16pay.html
+++ b/docs/plugins/html/gst-plugins-good-plugins-rtpL16pay.html
@@ -67,7 +67,7 @@ For detailed information see: http://www.rfc-editor.org/rfc/rfc3551.txt</p>
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v audiotestsrc <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> rtpL16pay <span class="gtkdoc opt">!</span> udpsink</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v audiotestsrc <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> rtpL16pay <span class="gtkdoc opt">!</span> udpsink</pre></td>
       </tr>
     </tbody>
   </table>
diff --git a/docs/plugins/html/gst-plugins-good-plugins-rtpac3pay.html b/docs/plugins/html/gst-plugins-good-plugins-rtpac3pay.html
index 6f73f90035b245af203ab1531cf5dc9b709514e3..5523da8b88fddd1b33e730dd2aa9ce77b4f637cb 100644
--- a/docs/plugins/html/gst-plugins-good-plugins-rtpac3pay.html
+++ b/docs/plugins/html/gst-plugins-good-plugins-rtpac3pay.html
@@ -66,7 +66,7 @@ For detailed information see: http://www.rfc-editor.org/rfc/rfc4184.txt</p>
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v audiotestsrc <span class="gtkdoc opt">!</span> avenc_ac3 <span class="gtkdoc opt">!</span> rtpac3pay <span class="gtkdoc opt">!</span> udpsink</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v audiotestsrc <span class="gtkdoc opt">!</span> avenc_ac3 <span class="gtkdoc opt">!</span> rtpac3pay <span class="gtkdoc opt">!</span> udpsink</pre></td>
       </tr>
     </tbody>
   </table>
diff --git a/docs/plugins/html/gst-plugins-good-plugins-rtpamrpay.html b/docs/plugins/html/gst-plugins-good-plugins-rtpamrpay.html
index 2a05f3688e1ca5d0409a19e53b2e94b37ae72860..d5d4d5367c211b3b4e542bd904123c996f781895 100644
--- a/docs/plugins/html/gst-plugins-good-plugins-rtpamrpay.html
+++ b/docs/plugins/html/gst-plugins-good-plugins-rtpamrpay.html
@@ -66,7 +66,7 @@ For detailed information see: http://www.rfc-editor.org/rfc/rfc3267.txt</p>
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v audiotestsrc <span class="gtkdoc opt">!</span> amrnbenc <span class="gtkdoc opt">!</span> rtpamrpay <span class="gtkdoc opt">!</span> udpsink</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v audiotestsrc <span class="gtkdoc opt">!</span> amrnbenc <span class="gtkdoc opt">!</span> rtpamrpay <span class="gtkdoc opt">!</span> udpsink</pre></td>
       </tr>
     </tbody>
   </table>
diff --git a/docs/plugins/html/gst-plugins-good-plugins-rtpbin.html b/docs/plugins/html/gst-plugins-good-plugins-rtpbin.html
index 95eb549d0a2953b49292342cdda4e5367ec44837..8edb983d541c1d2763a4bd38b1d40ee307f971fc 100644
--- a/docs/plugins/html/gst-plugins-good-plugins-rtpbin.html
+++ b/docs/plugins/html/gst-plugins-good-plugins-rtpbin.html
@@ -71,7 +71,7 @@
 <td class="property_flags">Read / Write</td>
 </tr>
 <tr>
-<td class="property_type"><span class="type">RTPJitterBufferMode</span></td>
+<td class="property_type"><a class="link" href="gst-plugins-good-plugins-rtpbin.html#RTPJitterBufferMode" title="enum RTPJitterBufferMode"><span class="type">RTPJitterBufferMode</span></a></td>
 <td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--buffer-mode" title="The “buffer-mode” property">buffer-mode</a></td>
 <td class="property_flags">Read / Write</td>
 </tr>
@@ -86,7 +86,7 @@
 <td class="property_flags">Read / Write</td>
 </tr>
 <tr>
-<td class="property_type"><span class="type">GstRTCPSync</span></td>
+<td class="property_type"><a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRTCPSync" title="enum GstRTCPSync"><span class="type">GstRTCPSync</span></a></td>
 <td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--rtcp-sync" title="The “rtcp-sync” property">rtcp-sync</a></td>
 <td class="property_flags">Read / Write</td>
 </tr>
@@ -250,10 +250,20 @@
 <col width="150px" class="name">
 <col class="description">
 </colgroup>
-<tbody><tr>
+<tbody>
+<tr>
 <td class="datatype_keyword">struct</td>
 <td class="function_name"><a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-struct" title="struct GstRtpBin">GstRtpBin</a></td>
-</tr></tbody>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="gst-plugins-good-plugins-rtpbin.html#RTPJitterBufferMode" title="enum RTPJitterBufferMode">RTPJitterBufferMode</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRTCPSync" title="enum GstRTCPSync">GstRTCPSync</a></td>
+</tr>
+</tbody>
 </table></div>
 </div>
 <div class="refsect1">
@@ -624,6 +634,94 @@ on port 5007.
 <p>
 </p>
 </div>
+<hr>
+<div class="refsect2">
+<a name="RTPJitterBufferMode"></a><h3>enum RTPJitterBufferMode</h3>
+<p>RTP_JITTER_BUFFER_MODE_NONE: don't do any skew correction, outgoing
+   timestamps are calculated directly from the RTP timestamps. This mode is
+   good for recording but not for real-time applications.
+RTP_JITTER_BUFFER_MODE_SLAVE: calculate the skew between sender and receiver
+   and produce smoothed adjusted outgoing timestamps. This mode is good for
+   low latency communications.
+RTP_JITTER_BUFFER_MODE_BUFFER: buffer packets between low/high watermarks.
+   This mode is good for streaming communication.
+RTP_JITTER_BUFFER_MODE_SYNCED: sender and receiver clocks are synchronized,
+   like <a class="link" href="gst-plugins-good-plugins-rtpbin.html#RTP-JITTER-BUFFER-MODE-SLAVE:CAPS"><span class="type">RTP_JITTER_BUFFER_MODE_SLAVE</span></a> but skew is assumed to be 0. Good for
+   low latency communication when sender and receiver clocks are
+   synchronized and there is thus no clock skew.
+RTP_JITTER_BUFFER_MODE_LAST: last buffer mode.</p>
+<p>The different buffer modes for a jitterbuffer.</p>
+<div class="refsect3">
+<a name="id-1.2.124.11.3.5"></a><h4>Members</h4>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="300px" class="enum_members_name">
+<col class="enum_members_description">
+<col width="200px" class="enum_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="enum_member_name"><p><a name="RTP-JITTER-BUFFER-MODE-NONE:CAPS"></a>RTP_JITTER_BUFFER_MODE_NONE</p></td>
+<td class="enum_member_description"> </td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="RTP-JITTER-BUFFER-MODE-SLAVE:CAPS"></a>RTP_JITTER_BUFFER_MODE_SLAVE</p></td>
+<td class="enum_member_description"> </td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="RTP-JITTER-BUFFER-MODE-BUFFER:CAPS"></a>RTP_JITTER_BUFFER_MODE_BUFFER</p></td>
+<td class="enum_member_description"> </td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="RTP-JITTER-BUFFER-MODE-SYNCED:CAPS"></a>RTP_JITTER_BUFFER_MODE_SYNCED</p></td>
+<td class="enum_member_description"> </td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="RTP-JITTER-BUFFER-MODE-LAST:CAPS"></a>RTP_JITTER_BUFFER_MODE_LAST</p></td>
+<td class="enum_member_description"> </td>
+<td class="enum_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstRTCPSync"></a><h3>enum GstRTCPSync</h3>
+<p>
+</p>
+<div class="refsect3">
+<a name="id-1.2.124.11.4.4"></a><h4>Members</h4>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="300px" class="enum_members_name">
+<col class="enum_members_description">
+<col width="200px" class="enum_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="enum_member_name"><p><a name="GST-RTP-BIN-RTCP-SYNC-ALWAYS:CAPS"></a>GST_RTP_BIN_RTCP_SYNC_ALWAYS</p></td>
+<td class="enum_member_description"> </td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-RTP-BIN-RTCP-SYNC-INITIAL:CAPS"></a>GST_RTP_BIN_RTCP_SYNC_INITIAL</p></td>
+<td class="enum_member_description"> </td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-RTP-BIN-RTCP-SYNC-RTP:CAPS"></a>GST_RTP_BIN_RTCP_SYNC_RTP</p></td>
+<td class="enum_member_description"> </td>
+<td class="enum_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-good-plugins-rtpbin.property-details"></a><h2>Property Details</h2>
@@ -668,7 +766,7 @@ on port 5007.
 <hr>
 <div class="refsect2">
 <a name="GstRtpBin--buffer-mode"></a><h3>The <code class="literal">“buffer-mode”</code> property</h3>
-<pre class="programlisting">  “buffer-mode”              <span class="type">RTPJitterBufferMode</span></pre>
+<pre class="programlisting">  “buffer-mode”              <a class="link" href="gst-plugins-good-plugins-rtpbin.html#RTPJitterBufferMode" title="enum RTPJitterBufferMode"><span class="type">RTPJitterBufferMode</span></a></pre>
 <p>Control the buffering and timestamping mode used by the jitterbuffer.</p>
 <p>Flags: Read / Write</p>
 <p>Default value: Slave receiver to sender clock</p>
@@ -696,7 +794,7 @@ used to synchronize receivers on multiple machines.</p>
 <hr>
 <div class="refsect2">
 <a name="GstRtpBin--rtcp-sync"></a><h3>The <code class="literal">“rtcp-sync”</code> property</h3>
-<pre class="programlisting">  “rtcp-sync”                <span class="type">GstRTCPSync</span></pre>
+<pre class="programlisting">  “rtcp-sync”                <a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRTCPSync" title="enum GstRTCPSync"><span class="type">GstRTCPSync</span></a></pre>
 <p>If not synchronizing (directly) to the NTP clock, determines how to sync
 the various streams.</p>
 <p>Flags: Read / Write</p>
diff --git a/docs/plugins/html/gst-plugins-good-plugins-rtpjitterbuffer.html b/docs/plugins/html/gst-plugins-good-plugins-rtpjitterbuffer.html
index b7ea686b5377df77caa7fd0b331e4cfc849b76d1..6f336caab6605f363a2b6d0ba25567393d2083c7 100644
--- a/docs/plugins/html/gst-plugins-good-plugins-rtpjitterbuffer.html
+++ b/docs/plugins/html/gst-plugins-good-plugins-rtpjitterbuffer.html
@@ -64,7 +64,7 @@
 <td class="property_flags">Read / Write</td>
 </tr>
 <tr>
-<td class="property_type"><span class="type">RTPJitterBufferMode</span></td>
+<td class="property_type"><a class="link" href="gst-plugins-good-plugins-rtpbin.html#RTPJitterBufferMode" title="enum RTPJitterBufferMode"><span class="type">RTPJitterBufferMode</span></a></td>
 <td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--mode" title="The “mode” property">mode</a></td>
 <td class="property_flags">Read / Write</td>
 </tr>
@@ -400,7 +400,7 @@ This is mainly used to ensure interstream synchronisation.</p>
 <hr>
 <div class="refsect2">
 <a name="GstRtpJitterBuffer--mode"></a><h3>The <code class="literal">“mode”</code> property</h3>
-<pre class="programlisting">  “mode”                     <span class="type">RTPJitterBufferMode</span></pre>
+<pre class="programlisting">  “mode”                     <a class="link" href="gst-plugins-good-plugins-rtpbin.html#RTPJitterBufferMode" title="enum RTPJitterBufferMode"><span class="type">RTPJitterBufferMode</span></a></pre>
 <p>Control the buffering and timestamping mode used by the jitterbuffer.</p>
 <p>Flags: Read / Write</p>
 <p>Default value: Slave receiver to sender clock</p>
@@ -476,10 +476,28 @@ latency and the observed round trip time.</p>
 <pre class="programlisting">  “stats”                    <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstStructure.html"><span class="type">GstStructure</span></a> *</pre>
 <p>Various jitterbuffer statistics. This property returns a GstStructure
 with name application/x-rtp-jitterbuffer-stats with the following fields:</p>
-<p> "rtx-count"         G_TYPE_UINT64 The number of retransmissions requested
- "rtx-success-count" G_TYPE_UINT64 The number of successful retransmissions
- "rtx-per-packet"    G_TYPE_DOUBLE Average number of RTX per packet
- "rtx-rtt"           G_TYPE_UINT64 Average round trip time per RTX</p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+  <span class="type">guint64</span>
+  <code class="classname">"rtx-count"</code>:
+  the number of retransmissions requested.
+  </p></li>
+<li class="listitem"><p>
+  <span class="type">guint64</span>
+  <code class="classname">"rtx-success-count"</code>:
+  the number of successful retransmissions.
+  </p></li>
+<li class="listitem"><p>
+  <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>
+  <code class="classname">"rtx-per-packet"</code>:
+  average number of RTX per packet.
+  </p></li>
+<li class="listitem"><p>
+  <span class="type">guint64</span>
+  <code class="classname">"rtx-rtt"</code>:
+  average round trip time per RTX.
+  </p></li>
+</ul></div>
 <p>Flags: Read</p>
 <p class="since">Since 1.4</p>
 </div>
diff --git a/docs/plugins/html/gst-plugins-good-plugins-rtpmux.html b/docs/plugins/html/gst-plugins-good-plugins-rtpmux.html
index 0ad696492321ee1558003c762ac24eb13c0f1716..38420348dfc4a97f5240862be8061c9063b6c1cf 100644
--- a/docs/plugins/html/gst-plugins-good-plugins-rtpmux.html
+++ b/docs/plugins/html/gst-plugins-good-plugins-rtpmux.html
@@ -104,7 +104,7 @@ muxes into a single stream with a single SSRC.</p>
 4
 5
 6</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch rtpmux name<span class="gtkdoc opt">=</span>mux <span class="gtkdoc opt">!</span> udpsink host<span class="gtkdoc opt">=</span><span class="number">127.0.0.1</span> port<span class="gtkdoc opt">=</span><span class="number">8888</span>        \
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> rtpmux name<span class="gtkdoc opt">=</span>mux <span class="gtkdoc opt">!</span> udpsink host<span class="gtkdoc opt">=</span><span class="number">127.0.0.1</span> port<span class="gtkdoc opt">=</span><span class="number">8888</span>        \
              alsasrc <span class="gtkdoc opt">!</span> alawenc <span class="gtkdoc opt">!</span> rtppcmapay <span class="gtkdoc opt">!</span>                        \
              application<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>rtp<span class="gtkdoc opt">,</span> payload<span class="gtkdoc opt">=</span><span class="number">8</span><span class="gtkdoc opt">,</span> rate<span class="gtkdoc opt">=</span><span class="number">8000</span> <span class="gtkdoc opt">!</span> mux<span class="gtkdoc opt">.</span>sink_0    \
              audiotestsrc is<span class="gtkdoc opt">-</span>live<span class="gtkdoc opt">=</span><span class="number">1</span> <span class="gtkdoc opt">!</span>                                \
diff --git a/docs/plugins/html/index.sgml b/docs/plugins/html/index.sgml
index 6f09c4a868e43f2aeffb59a9972f40a750e1b157..153f82271c2359bc8a798affe80c101e652fc166 100644
--- a/docs/plugins/html/index.sgml
+++ b/docs/plugins/html/index.sgml
@@ -1626,6 +1626,8 @@
 <ANCHOR id="gst-plugins-good-plugins-rtpbin.functions_details" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#gst-plugins-good-plugins-rtpbin.functions_details">
 <ANCHOR id="gst-plugins-good-plugins-rtpbin.other_details" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#gst-plugins-good-plugins-rtpbin.other_details">
 <ANCHOR id="GstRtpBin-struct" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin-struct">
+<ANCHOR id="RTPJitterBufferMode" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#RTPJitterBufferMode">
+<ANCHOR id="GstRTCPSync" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRTCPSync">
 <ANCHOR id="gst-plugins-good-plugins-rtpbin.property-details" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#gst-plugins-good-plugins-rtpbin.property-details">
 <ANCHOR id="GstRtpBin--do-lost" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin--do-lost">
 <ANCHOR id="GstRtpBin--latency" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin--latency">
diff --git a/ext/dv/gstdvdemux.c b/ext/dv/gstdvdemux.c
index 352283a9abf5932b1e11c589c89232bec9d06233..be996477108fd672cfe582cb88c1b58448f32a17 100644
--- a/ext/dv/gstdvdemux.c
+++ b/ext/dv/gstdvdemux.c
@@ -303,6 +303,8 @@ gst_dvdemux_add_pad (GstDVDemux * dvdemux, GstStaticPadTemplate * template,
   GstPad *pad;
   GstEvent *event;
   gchar *stream_id;
+  gchar rec_datetime[40];
+  GstDateTime *rec_dt;
 
   pad = gst_pad_new_from_static_template (template, template->name_template);
 
@@ -341,6 +343,16 @@ gst_dvdemux_add_pad (GstDVDemux * dvdemux, GstStaticPadTemplate * template,
 
     tags = gst_tag_list_new (GST_TAG_CONTAINER_FORMAT, "DV", NULL);
     gst_tag_list_set_scope (tags, GST_TAG_SCOPE_GLOBAL);
+
+    if (dv_get_recording_datetime (dvdemux->decoder, rec_datetime)) {
+      rec_dt = gst_date_time_new_from_iso8601_string (rec_datetime);
+      if (rec_dt) {
+        gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE, GST_TAG_DATE_TIME,
+            rec_dt, NULL);
+        gst_date_time_unref (rec_dt);
+      }
+    }
+
     if (dvdemux->videosrcpad)
       gst_pad_push_event (dvdemux->videosrcpad,
           gst_event_new_tag (gst_tag_list_ref (tags)));
diff --git a/ext/jpeg/gstjpegdec.c b/ext/jpeg/gstjpegdec.c
index 25dfb0093b5055fad51040ec037a28c8d99acbeb..a1ba7c0c15dce8ee61c8ad10bbe076d2b28f981f 100644
--- a/ext/jpeg/gstjpegdec.c
+++ b/ext/jpeg/gstjpegdec.c
@@ -994,6 +994,7 @@ gst_jpeg_dec_handle_frame (GstVideoDecoder * bdec, GstVideoCodecFrame * frame)
   guint code, hdr_ok;
   gboolean need_unmap = TRUE;
   GstVideoCodecState *state = NULL;
+  gboolean release_frame = TRUE;
 
   dec->current_frame = frame;
   gst_buffer_map (frame->input_buffer, &dec->current_frame_map, GST_MAP_READ);
@@ -1141,6 +1142,7 @@ gst_jpeg_dec_handle_frame (GstVideoDecoder * bdec, GstVideoCodecFrame * frame)
 
   gst_buffer_unmap (frame->input_buffer, &dec->current_frame_map);
   ret = gst_video_decoder_finish_frame (bdec, frame);
+  release_frame = FALSE;
   need_unmap = FALSE;
 
 done:
@@ -1150,6 +1152,9 @@ exit:
   if (need_unmap)
     gst_buffer_unmap (frame->input_buffer, &dec->current_frame_map);
 
+  if (release_frame)
+    gst_video_decoder_release_frame (bdec, frame);
+
   if (state)
     gst_video_codec_state_unref (state);
 
@@ -1183,6 +1188,7 @@ decode_error:
 
     gst_buffer_unmap (frame->input_buffer, &dec->current_frame_map);
     gst_video_decoder_drop_frame (bdec, frame);
+    release_frame = FALSE;
     need_unmap = FALSE;
     jpeg_abort_decompress (&dec->cinfo);
 
diff --git a/ext/shout2/gstshout2.c b/ext/shout2/gstshout2.c
index 613bc7ad672e5038b8bda5bb55343cabdacd3abc..2384ebc9a591a6402a1df053e6f5ee1523b5a9c2 100644
--- a/ext/shout2/gstshout2.c
+++ b/ext/shout2/gstshout2.c
@@ -27,7 +27,7 @@
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch uridecodebin uri=file:///path/to/audiofile ! audioconvert ! vorbisenc ! oggmux ! shout2send mount=/stream.ogg port=8000 username=source password=somepassword ip=server_IP_address_or_hostname
+ * gst-launch-1.0 uridecodebin uri=file:///path/to/audiofile ! audioconvert ! vorbisenc ! oggmux ! shout2send mount=/stream.ogg port=8000 username=source password=somepassword ip=server_IP_address_or_hostname
  * ]| This pipeline demuxes, decodes, re-encodes and re-muxes an audio
  * media file into oggvorbis and sends the resulting stream to an Icecast
  * server. Properties mount, port, username and password are all server-config
diff --git a/ext/vpx/gstvp8dec.c b/ext/vpx/gstvp8dec.c
index 295111812a99845cfdd1c20c3f6970cbddf9521f..4b05f9969708e9966543b259bc414d51a4ada7f2 100644
--- a/ext/vpx/gstvp8dec.c
+++ b/ext/vpx/gstvp8dec.c
@@ -32,7 +32,7 @@
  * <refsect2>
  * <title>Example pipeline</title>
  * |[
- * gst-launch -v filesrc location=videotestsrc.webm ! matroskademux ! vp8dec ! xvimagesink
+ * gst-launch-1.0 -v filesrc location=videotestsrc.webm ! matroskademux ! vp8dec ! videoconvert ! videoscale ! autovideosink
  * ]| This example pipeline will decode a WebM stream and decodes the VP8 video.
  * </refsect2>
  */
@@ -390,12 +390,18 @@ gst_vp8_dec_image_to_buffer (GstVP8Dec * dec, const vpx_image_t * img,
     deststride = GST_VIDEO_FRAME_COMP_STRIDE (&frame, comp);
     srcstride = img->stride[comp];
 
-    /* FIXME (Edward) : Do a plane memcpy is srcstride == deststride instead
-     * of copying line by line */
-    for (line = 0; line < height; line++) {
-      memcpy (dest, src, width);
-      dest += deststride;
-      src += srcstride;
+    if (srcstride == deststride) {
+      GST_TRACE_OBJECT (dec, "Stride matches. Comp %d: %d, copying full plane",
+          comp, srcstride);
+      memcpy (dest, src, srcstride * height);
+    } else {
+      GST_TRACE_OBJECT (dec, "Stride mismatch. Comp %d: %d != %d, copying "
+          "line by line.", comp, srcstride, deststride);
+      for (line = 0; line < height; line++) {
+        memcpy (dest, src, width);
+        dest += deststride;
+        src += srcstride;
+      }
     }
   }
 
diff --git a/ext/vpx/gstvp8enc.c b/ext/vpx/gstvp8enc.c
index 9d38de3c7dbaa6f77389bed654e1084538d6c8cb..364bfa3fe767c8c63abc62dd96d1908ba936b0a7 100644
--- a/ext/vpx/gstvp8enc.c
+++ b/ext/vpx/gstvp8enc.c
@@ -40,7 +40,7 @@
  * <refsect2>
  * <title>Example pipeline</title>
  * |[
- * gst-launch -v videotestsrc num-buffers=1000 ! vp8enc ! webmmux ! filesink location=videotestsrc.webm
+ * gst-launch-1.0 -v videotestsrc num-buffers=1000 ! vp8enc ! webmmux ! filesink location=videotestsrc.webm
  * ]| This example pipeline will encode a test video source to VP8 muxed in an
  * WebM container.
  * </refsect2>
@@ -385,7 +385,10 @@ static GstStaticPadTemplate gst_vp8_enc_sink_template =
 GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("I420"))
+    GST_STATIC_CAPS ("video/x-raw, "
+        "format = (string) \"I420\", "
+        "width = (int) [1, 16383], "
+        "height = (int) [1, 16383], framerate = (fraction) [ 0/1, MAX ]")
     );
 
 static GstStaticPadTemplate gst_vp8_enc_src_template =
@@ -1537,22 +1540,12 @@ gst_vp8_enc_set_format (GstVideoEncoder * video_encoder,
     GST_DEBUG_OBJECT (video_encoder, "Using timebase configuration");
     encoder->cfg.g_timebase.num = encoder->timebase_n;
     encoder->cfg.g_timebase.den = encoder->timebase_d;
-  } else if (GST_VIDEO_INFO_FPS_D (info) != 0
-      && GST_VIDEO_INFO_FPS_N (info) != 0) {
-    /* GstVideoInfo holds either the framerate or max-framerate (if framerate
-     * is 0) in FPS so this will be used if max-framerate or framerate
-     * is set */
-    GST_DEBUG_OBJECT (video_encoder, "Setting timebase from framerate");
-    encoder->cfg.g_timebase.num = GST_VIDEO_INFO_FPS_D (info);
-    encoder->cfg.g_timebase.den = GST_VIDEO_INFO_FPS_N (info);
   } else {
     /* Zero framerate and max-framerate but still need to setup the timebase to avoid
      * a divide by zero error. Presuming the lowest common denominator will be RTP -
      * VP8 payload draft states clock rate of 90000 which should work for anyone where
      * FPS < 90000 (shouldn't be too many cases where it's higher) though wouldn't be optimal. RTP specification
      * http://tools.ietf.org/html/draft-ietf-payload-vp8-01 section 6.3.1 */
-    GST_WARNING_OBJECT (encoder,
-        "No timebase and zero framerate setting timebase to 1/90000");
     encoder->cfg.g_timebase.num = 1;
     encoder->cfg.g_timebase.den = 90000;
   }
@@ -1893,8 +1886,8 @@ gst_vp8_enc_drain (GstVideoEncoder * video_encoder)
 
   pts =
       gst_util_uint64_scale (encoder->last_pts,
-      encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND,
-      encoder->cfg.g_timebase.den);
+      encoder->cfg.g_timebase.den,
+      encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND);
 
   status = vpx_codec_encode (&encoder->encoder, NULL, pts, 0, flags, deadline);
   g_mutex_unlock (&encoder->encoder_lock);
@@ -2018,15 +2011,14 @@ gst_vp8_enc_handle_frame (GstVideoEncoder * video_encoder,
   g_mutex_lock (&encoder->encoder_lock);
   pts =
       gst_util_uint64_scale (frame->pts,
-      encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND,
-      encoder->cfg.g_timebase.den);
+      encoder->cfg.g_timebase.den,
+      encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND);
   encoder->last_pts = frame->pts;
 
   if (frame->duration != GST_CLOCK_TIME_NONE) {
     duration =
-        gst_util_uint64_scale (frame->duration,
-        encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND,
-        encoder->cfg.g_timebase.den);
+        gst_util_uint64_scale (frame->duration, encoder->cfg.g_timebase.den,
+        encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND);
     encoder->last_pts += frame->duration;
   } else {
     duration = 1;
diff --git a/ext/vpx/gstvp9dec.c b/ext/vpx/gstvp9dec.c
index 5a18f3a5705386cdba90cce4a06329daaad754b3..a11c848109ba259f14d59aea438aa49d4b4ee3a2 100644
--- a/ext/vpx/gstvp9dec.c
+++ b/ext/vpx/gstvp9dec.c
@@ -32,7 +32,7 @@
  * <refsect2>
  * <title>Example pipeline</title>
  * |[
- * gst-launch -v filesrc location=videotestsrc.webm ! matroskademux ! vp9dec ! xvimagesink
+ * gst-launch-1.0 -v filesrc location=videotestsrc.webm ! matroskademux ! vp9dec ! videoconvert ! videoscale ! autovideosink
  * ]| This example pipeline will decode a WebM stream and decodes the VP9 video.
  * </refsect2>
  */
@@ -387,12 +387,18 @@ gst_vp9_dec_image_to_buffer (GstVP9Dec * dec, const vpx_image_t * img,
     deststride = GST_VIDEO_FRAME_COMP_STRIDE (&frame, comp);
     srcstride = img->stride[comp];
 
-    /* FIXME (Edward) : Do a plane memcpy is srcstride == deststride instead
-     * of copying line by line */
-    for (line = 0; line < height; line++) {
-      memcpy (dest, src, width);
-      dest += deststride;
-      src += srcstride;
+    if (srcstride == deststride) {
+      GST_TRACE_OBJECT (dec, "Stride matches. Comp %d: %d, copying full plane",
+          comp, srcstride);
+      memcpy (dest, src, srcstride * height);
+    } else {
+      GST_TRACE_OBJECT (dec, "Stride mismatch. Comp %d: %d != %d, copying "
+          "line by line.", comp, srcstride, deststride);
+      for (line = 0; line < height; line++) {
+        memcpy (dest, src, width);
+        dest += deststride;
+        src += srcstride;
+      }
     }
   }
 
diff --git a/ext/vpx/gstvp9enc.c b/ext/vpx/gstvp9enc.c
index e64f5af5efb480632fc10b379f77f8b3b5cd4428..4f272b4bb2f3e3a35de447290cb606b98688d27c 100644
--- a/ext/vpx/gstvp9enc.c
+++ b/ext/vpx/gstvp9enc.c
@@ -40,7 +40,7 @@
  * <refsect2>
  * <title>Example pipeline</title>
  * |[
- * gst-launch -v videotestsrc num-buffers=1000 ! vp9enc ! webmmux ! filesink location=videotestsrc.webm
+ * gst-launch-1.0 -v videotestsrc num-buffers=1000 ! vp9enc ! webmmux ! filesink location=videotestsrc.webm
  * ]| This example pipeline will encode a test video source to VP9 muxed in an
  * WebM container.
  * </refsect2>
@@ -1513,22 +1513,12 @@ gst_vp9_enc_set_format (GstVideoEncoder * video_encoder,
     GST_DEBUG_OBJECT (video_encoder, "Using timebase configuration");
     encoder->cfg.g_timebase.num = encoder->timebase_n;
     encoder->cfg.g_timebase.den = encoder->timebase_d;
-  } else if (GST_VIDEO_INFO_FPS_D (info) != 0
-      && GST_VIDEO_INFO_FPS_N (info) != 0) {
-    /* GstVideoInfo holds either the framerate or max-framerate (if framerate
-     * is 0) in FPS so this will be used if max-framerate or framerate
-     * is set */
-    GST_DEBUG_OBJECT (video_encoder, "Setting timebase from framerate");
-    encoder->cfg.g_timebase.num = GST_VIDEO_INFO_FPS_D (info);
-    encoder->cfg.g_timebase.den = GST_VIDEO_INFO_FPS_N (info);
   } else {
     /* Zero framerate and max-framerate but still need to setup the timebase to avoid
      * a divide by zero error. Presuming the lowest common denominator will be RTP -
      * VP9 payload draft states clock rate of 90000 which should work for anyone where
      * FPS < 90000 (shouldn't be too many cases where it's higher) though wouldn't be optimal. RTP specification
      * http://tools.ietf.org/html/draft-ietf-payload-vp9-01 section 6.3.1 */
-    GST_WARNING_OBJECT (encoder,
-        "No timebase and zero framerate setting timebase to 1/90000");
     encoder->cfg.g_timebase.num = 1;
     encoder->cfg.g_timebase.den = 90000;
   }
@@ -1832,8 +1822,8 @@ gst_vp9_enc_drain (GstVideoEncoder * video_encoder)
 
   pts =
       gst_util_uint64_scale (encoder->last_pts,
-      encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND,
-      encoder->cfg.g_timebase.den);
+      encoder->cfg.g_timebase.den,
+      encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND);
 
   status = vpx_codec_encode (&encoder->encoder, NULL, pts, 0, flags, deadline);
   g_mutex_unlock (&encoder->encoder_lock);
@@ -1951,15 +1941,14 @@ gst_vp9_enc_handle_frame (GstVideoEncoder * video_encoder,
   g_mutex_lock (&encoder->encoder_lock);
   pts =
       gst_util_uint64_scale (frame->pts,
-      encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND,
-      encoder->cfg.g_timebase.den);
+      encoder->cfg.g_timebase.den,
+      encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND);
   encoder->last_pts = frame->pts;
 
   if (frame->duration != GST_CLOCK_TIME_NONE) {
     duration =
-        gst_util_uint64_scale (frame->duration,
-        encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND,
-        encoder->cfg.g_timebase.den);
+        gst_util_uint64_scale (frame->duration, encoder->cfg.g_timebase.den,
+        encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND);
     encoder->last_pts += frame->duration;
   } else {
     duration = 1;
diff --git a/gst-plugins-good.spec b/gst-plugins-good.spec
index 632fbb035598a3916274d250f5e1e41db5cf2ae6..acb204ed5f3925df489055fbf9c7c5d08d041ad8 100644
--- a/gst-plugins-good.spec
+++ b/gst-plugins-good.spec
@@ -5,7 +5,7 @@
 
 Name: 		%{gstreamer}-plugins-good
 Version: 	1.5.0.1
-Release: 	0.20150316.185508.gst
+Release: 	0.20150513.125648.gst
 Summary: 	GStreamer plug-ins with good code and licensing
 
 Group: 		Applications/Multimedia
diff --git a/gst/alpha/Makefile.am b/gst/alpha/Makefile.am
index ee6495e39ddeb5e132e5294d9697450211b6ccbd..abadffe59a72e1555a34a071c34f0bb5718ff534 100644
--- a/gst/alpha/Makefile.am
+++ b/gst/alpha/Makefile.am
@@ -17,17 +17,3 @@ libgstalphacolor_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstalphacolor_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstalpha.h gstalphacolor.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstalpha -:SHARED libgstalpha \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstalpha_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstalpha_la_CFLAGS) \
-	 -:LDFLAGS $(libgstalpha_la_LDFLAGS) \
-	           $(libgstalpha_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/alpha/Makefile.in b/gst/alpha/Makefile.in
index 06af5b077d53fc3fb718eb739945f0690f6895c8..247ea977fc7ee2db69d3fb07acc95491b51eba02 100644
--- a/gst/alpha/Makefile.in
+++ b/gst/alpha/Makefile.in
@@ -916,20 +916,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstalpha -:SHARED libgstalpha \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstalpha_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstalpha_la_CFLAGS) \
-	 -:LDFLAGS $(libgstalpha_la_LDFLAGS) \
-	           $(libgstalpha_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/alpha/gstalpha.c b/gst/alpha/gstalpha.c
index 9566f30e2cb9abedc231bd0910d89d9f62f47951..736f3778e2add2cb2767e7c677512dc12ca2d3a8 100644
--- a/gst/alpha/gstalpha.c
+++ b/gst/alpha/gstalpha.c
@@ -120,8 +120,7 @@ enum
   PROP_NOISE_LEVEL,
   PROP_BLACK_SENSITIVITY,
   PROP_WHITE_SENSITIVITY,
-  PROP_PREFER_PASSTHROUGH,
-  PROP_LAST
+  PROP_PREFER_PASSTHROUGH
 };
 
 static GstStaticPadTemplate gst_alpha_src_template =
diff --git a/gst/apetag/Makefile.am b/gst/apetag/Makefile.am
index f0984af655131f450d74e1d8550385fbc248b5c6..bb067717e4cb98037227051e882c17c7fe06058b 100644
--- a/gst/apetag/Makefile.am
+++ b/gst/apetag/Makefile.am
@@ -14,17 +14,3 @@ libgstapetag_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstapetag_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstapedemux.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstapetag -:SHARED libgstapetag \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstapetag_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstapetag_la_CFLAGS) \
-	 -:LDFLAGS $(libgstapetag_la_LDFLAGS) \
-	           $(libgstapetag_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/apetag/Makefile.in b/gst/apetag/Makefile.in
index 3e2b294a011655461f6a857fb413e8ddd20e0dfe..3039913fa3566696e7b7356d4a1f483e483de5f3 100644
--- a/gst/apetag/Makefile.in
+++ b/gst/apetag/Makefile.in
@@ -891,20 +891,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstapetag -:SHARED libgstapetag \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstapetag_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstapetag_la_CFLAGS) \
-	 -:LDFLAGS $(libgstapetag_la_LDFLAGS) \
-	           $(libgstapetag_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/audiofx/Makefile.am b/gst/audiofx/Makefile.am
index 3ca249c12da358b13aef7db50b7280fe9e7ae9d7..a3dd1743f74af390ad616ad8b2092f9897bb70b5 100644
--- a/gst/audiofx/Makefile.am
+++ b/gst/audiofx/Makefile.am
@@ -59,17 +59,3 @@ noinst_HEADERS = audiopanorama.h \
 	audioecho.h \
 	gstscaletempo.h \
 	math_compat.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstaudiofx -:SHARED libgstaudiofx \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaudiofx_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudiofx_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaudiofx_la_LDFLAGS) \
-	           $(libgstaudiofx_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/audiofx/Makefile.in b/gst/audiofx/Makefile.in
index fb456529260c3404702ac7143892520108e39aec..56b6a2ebb590d7e09bb82ab5a90c729181d641b5 100644
--- a/gst/audiofx/Makefile.in
+++ b/gst/audiofx/Makefile.in
@@ -1161,20 +1161,6 @@ dist-hook-orc: tmp-orc.c $(ORC_SOURCE).h
 	cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c
 	cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstaudiofx -:SHARED libgstaudiofx \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaudiofx_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudiofx_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaudiofx_la_LDFLAGS) \
-	           $(libgstaudiofx_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/audiofx/audioamplify.c b/gst/audiofx/audioamplify.c
index ad5f3c535e26a32d5289c080cbbc033ba18b9e68..726ce0e3a68252472668ae1bcdb1c3884f11c137 100644
--- a/gst/audiofx/audioamplify.c
+++ b/gst/audiofx/audioamplify.c
@@ -29,8 +29,8 @@
  * <title>Example launch line</title>
  * |[
  * gst-launch-1.0 audiotestsrc wave=saw ! audioamplify amplification=1.5 ! alsasink
- * gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audioamplify amplification=1.5 method=wrap-negative ! alsasink
- * gst-launch-1.0 audiotestsrc wave=saw ! audioconvert ! audioamplify amplification=1.5 method=wrap-positive ! audioconvert ! alsasink
+ * gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audioamplify amplification=1.5 clipping-method=wrap-negative ! alsasink
+ * gst-launch-1.0 audiotestsrc wave=saw ! audioconvert ! audioamplify amplification=1.5 clipping-method=wrap-positive ! audioconvert ! alsasink
  * ]|
  * </refsect2>
  */
diff --git a/gst/audiofx/audiodynamic.c b/gst/audiofx/audiodynamic.c
index a695191e20b9f07f7a3e57556cedbdfced8bd7e1..9b3a62c89718fe9aa4f4f3b3f082e1d3603f7028 100644
--- a/gst/audiofx/audiodynamic.c
+++ b/gst/audiofx/audiodynamic.c
@@ -29,8 +29,8 @@
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch-1.0 audiotestsrc wave=saw ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.5 rate=0.5 ! alsasink
- * gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audiodynamic characteristics=hard-knee mode=expander threshold=0.2 rate=4.0 ! alsasink
+ * gst-launch-1.0 audiotestsrc wave=saw ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.5 ratio=0.5 ! alsasink
+ * gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audiodynamic characteristics=hard-knee mode=expander threshold=0.2 ratio=4.0 ! alsasink
  * gst-launch-1.0 audiotestsrc wave=saw ! audioconvert ! audiodynamic ! audioconvert ! alsasink
  * ]|
  * </refsect2>
diff --git a/gst/audiofx/audiofxbasefirfilter.c b/gst/audiofx/audiofxbasefirfilter.c
index 6af55f7f3ed77fa5d45c59f61c4a8d1cdb33957d..ccafb0a338b573d950320cbaa8e3f815ef0ef331 100644
--- a/gst/audiofx/audiofxbasefirfilter.c
+++ b/gst/audiofx/audiofxbasefirfilter.c
@@ -116,6 +116,7 @@ process_##channels##_##width (GstAudioFXBaseFIRFilter * self, const g##ctype * s
     self->buffer = buffer = g_new0 (gdouble, self->buffer_length); \
   } \
   \
+  input_samples *= channels; \
   /* convolution */ \
   for (i = 0; i < input_samples; i++) { \
     dst[i] = 0.0; \
@@ -155,7 +156,7 @@ process_##channels##_##width (GstAudioFXBaseFIRFilter * self, const g##ctype * s
   if (self->buffer_fill > kernel_length) \
     self->buffer_fill = kernel_length; \
   \
-  return input_samples; \
+  return input_samples / channels; \
 } G_STMT_END
 
 DEFINE_PROCESS_FUNC (32, float);
diff --git a/gst/audiofx/audiokaraoke.c b/gst/audiofx/audiokaraoke.c
index 9d5d575f5a2153890bf5ac1fd8d59ebcf25d7381..76697ca17343f58a3fe34f9dec2e7c5da0cf333e 100644
--- a/gst/audiofx/audiokaraoke.c
+++ b/gst/audiofx/audiokaraoke.c
@@ -66,8 +66,7 @@ enum
   PROP_LEVEL,
   PROP_MONO_LEVEL,
   PROP_FILTER_BAND,
-  PROP_FILTER_WIDTH,
-  PROP_LAST
+  PROP_FILTER_WIDTH
 };
 
 #define ALLOWED_CAPS \
diff --git a/gst/audiofx/audiopanoramaorc-dist.c b/gst/audiofx/audiopanoramaorc-dist.c
index 12d6aa0e882766f80a636140b53aa2cb4f33299f..3d5999a61ec741960fb1f94b6cb574718c162485 100644
--- a/gst/audiofx/audiopanoramaorc-dist.c
+++ b/gst/audiofx/audiopanoramaorc-dist.c
@@ -264,7 +264,7 @@ audiopanoramam_orc_process_s16_ch1_none (gint16 * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 39, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115,
-            49,
+        49,
         54, 95, 99, 104, 49, 95, 110, 111, 110, 101, 11, 4, 4, 12, 2, 2,
         195, 0, 4, 4, 2, 0,
       };
@@ -390,7 +390,7 @@ audiopanoramam_orc_process_f32_ch1_none (gfloat * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 39, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102,
-            51,
+        51,
         50, 95, 99, 104, 49, 95, 110, 111, 110, 101, 11, 8, 8, 12, 4, 4,
         194, 0, 4, 4, 2, 0,
       };
@@ -502,7 +502,7 @@ audiopanoramam_orc_process_s16_ch2_none (gint16 * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 39, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115,
-            49,
+        49,
         54, 95, 99, 104, 50, 95, 110, 111, 110, 101, 11, 4, 4, 12, 4, 4,
         21, 1, 79, 0, 4, 2, 0,
       };
@@ -614,7 +614,7 @@ audiopanoramam_orc_process_f32_ch2_none (gfloat * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 39, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102,
-            51,
+        51,
         50, 95, 99, 104, 50, 95, 110, 111, 110, 101, 11, 8, 8, 12, 8, 8,
         21, 1, 112, 0, 4, 2, 0,
       };
@@ -842,7 +842,7 @@ audiopanoramam_orc_process_s16_ch1_psy (gint16 * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 38, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115,
-            49,
+        49,
         54, 95, 99, 104, 49, 95, 112, 115, 121, 11, 4, 4, 12, 2, 2, 17,
         4, 17, 4, 20, 8, 20, 4, 20, 4, 153, 33, 4, 211, 33, 33, 202,
         34, 33, 25, 202, 33, 33, 24, 194, 32, 33, 34, 21, 1, 210, 32, 32,
@@ -1053,7 +1053,7 @@ audiopanoramam_orc_process_f32_ch1_psy (gfloat * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 38, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102,
-            51,
+        51,
         50, 95, 99, 104, 49, 95, 112, 115, 121, 11, 8, 8, 12, 4, 4, 17,
         4, 17, 4, 20, 4, 20, 4, 202, 33, 4, 25, 202, 32, 4, 24, 194,
         0, 32, 33, 2, 0,
@@ -1355,7 +1355,7 @@ audiopanoramam_orc_process_s16_ch2_psy_right (gint16 * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 44, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115,
-            49,
+        49,
         54, 95, 99, 104, 50, 95, 112, 115, 121, 95, 114, 105, 103, 104, 116, 11,
         4, 4, 12, 4, 4, 17, 4, 17, 4, 20, 8, 20, 4, 20, 4, 20,
         4, 21, 1, 153, 32, 4, 21, 1, 211, 32, 32, 192, 33, 32, 193, 34,
@@ -1675,7 +1675,7 @@ audiopanoramam_orc_process_s16_ch2_psy_left (gint16 * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 43, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115,
-            49,
+        49,
         54, 95, 99, 104, 50, 95, 112, 115, 121, 95, 108, 101, 102, 116, 11, 4,
         4, 12, 4, 4, 17, 4, 17, 4, 20, 8, 20, 4, 20, 4, 20, 4,
         21, 1, 153, 32, 4, 21, 1, 211, 32, 32, 192, 33, 32, 193, 35, 32,
@@ -1945,7 +1945,7 @@ audiopanoramam_orc_process_f32_ch2_psy_right (gfloat * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 44, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102,
-            51,
+        51,
         50, 95, 99, 104, 50, 95, 112, 115, 121, 95, 114, 105, 103, 104, 116, 11,
         8, 8, 12, 8, 8, 17, 4, 17, 4, 20, 4, 20, 4, 20, 4, 192,
         32, 4, 193, 33, 4, 202, 34, 32, 25, 202, 32, 32, 24, 200, 33, 34,
@@ -2205,7 +2205,7 @@ audiopanoramam_orc_process_f32_ch2_psy_left (gfloat * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 43, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102,
-            51,
+        51,
         50, 95, 99, 104, 50, 95, 112, 115, 121, 95, 108, 101, 102, 116, 11, 8,
         8, 12, 8, 8, 17, 4, 17, 4, 20, 4, 20, 4, 20, 4, 192, 32,
         4, 193, 34, 4, 202, 33, 34, 24, 202, 34, 34, 25, 200, 32, 33, 32,
@@ -2433,7 +2433,7 @@ audiopanoramam_orc_process_s16_ch1_sim_right (gint16 * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 44, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115,
-            49,
+        49,
         54, 95, 99, 104, 49, 95, 115, 105, 109, 95, 114, 105, 103, 104, 116, 11,
         4, 4, 12, 2, 2, 17, 4, 20, 8, 20, 4, 20, 4, 153, 33, 4,
         211, 33, 33, 202, 34, 33, 24, 194, 32, 33, 34, 21, 1, 210, 32, 32,
@@ -2655,7 +2655,7 @@ audiopanoramam_orc_process_s16_ch1_sim_left (gint16 * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 43, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115,
-            49,
+        49,
         54, 95, 99, 104, 49, 95, 115, 105, 109, 95, 108, 101, 102, 116, 11, 4,
         4, 12, 2, 2, 17, 4, 20, 8, 20, 4, 20, 4, 153, 34, 4, 211,
         34, 34, 202, 33, 34, 24, 194, 32, 33, 34, 21, 1, 210, 32, 32, 21,
@@ -2909,7 +2909,7 @@ audiopanoramam_orc_process_s16_ch2_sim_right (gint16 * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 44, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115,
-            49,
+        49,
         54, 95, 99, 104, 50, 95, 115, 105, 109, 95, 114, 105, 103, 104, 116, 11,
         4, 4, 12, 4, 4, 17, 4, 20, 8, 20, 4, 20, 4, 21, 1, 153,
         32, 4, 21, 1, 211, 32, 32, 192, 33, 32, 193, 34, 32, 202, 34, 34,
@@ -3168,7 +3168,7 @@ audiopanoramam_orc_process_s16_ch2_sim_left (gint16 * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 43, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 115,
-            49,
+        49,
         54, 95, 99, 104, 50, 95, 115, 105, 109, 95, 108, 101, 102, 116, 11, 4,
         4, 12, 4, 4, 17, 4, 20, 8, 20, 4, 20, 4, 21, 1, 153, 32,
         4, 21, 1, 211, 32, 32, 192, 33, 32, 193, 34, 32, 202, 33, 33, 24,
@@ -3355,7 +3355,7 @@ audiopanoramam_orc_process_f32_ch1_sim_right (gfloat * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 44, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102,
-            51,
+        51,
         50, 95, 99, 104, 49, 95, 115, 105, 109, 95, 114, 105, 103, 104, 116, 11,
         8, 8, 12, 4, 4, 17, 4, 20, 4, 20, 4, 112, 32, 4, 202, 33,
         4, 24, 194, 0, 32, 33, 2, 0,
@@ -3529,7 +3529,7 @@ audiopanoramam_orc_process_f32_ch1_sim_left (gfloat * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 43, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102,
-            51,
+        51,
         50, 95, 99, 104, 49, 95, 115, 105, 109, 95, 108, 101, 102, 116, 11, 8,
         8, 12, 4, 4, 17, 4, 20, 4, 20, 4, 202, 32, 4, 24, 112, 33,
         4, 194, 0, 32, 33, 2, 0,
@@ -3725,7 +3725,7 @@ audiopanoramam_orc_process_f32_ch2_sim_right (gfloat * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 44, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102,
-            51,
+        51,
         50, 95, 99, 104, 50, 95, 115, 105, 109, 95, 114, 105, 103, 104, 116, 11,
         8, 8, 12, 8, 8, 17, 4, 20, 4, 20, 4, 192, 32, 4, 193, 33,
         4, 202, 33, 33, 24, 194, 0, 32, 33, 2, 0,
@@ -3923,7 +3923,7 @@ audiopanoramam_orc_process_f32_ch2_sim_left (gfloat * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 43, 97, 117, 100, 105, 111, 112, 97, 110, 111, 114, 97, 109, 97,
         109, 95, 111, 114, 99, 95, 112, 114, 111, 99, 101, 115, 115, 95, 102,
-            51,
+        51,
         50, 95, 99, 104, 50, 95, 115, 105, 109, 95, 108, 101, 102, 116, 11, 8,
         8, 12, 8, 8, 17, 4, 20, 4, 20, 4, 192, 32, 4, 193, 33, 4,
         202, 32, 32, 24, 194, 0, 32, 33, 2, 0,
diff --git a/gst/audioparsers/gstac3parse.c b/gst/audioparsers/gstac3parse.c
index c166dc821ace3cc084648bb590894a08fcb0ab7e..4a6cd6d03cea6e146a0eaa2da3c900e60ca5f2a2 100644
--- a/gst/audioparsers/gstac3parse.c
+++ b/gst/audioparsers/gstac3parse.c
@@ -478,7 +478,8 @@ gst_ac3_parse_frame_header (GstAc3Parse * parse, GstBuffer * buf, gint skip,
     goto cleanup;
   } else {
     GST_DEBUG_OBJECT (parse, "unexpected bsid %d", bsid);
-    return FALSE;
+    ret = FALSE;
+    goto cleanup;
   }
 
   GST_DEBUG_OBJECT (parse, "unexpected bsid %d", bsid);
diff --git a/gst/audioparsers/gstflacparse.c b/gst/audioparsers/gstflacparse.c
index 51e1bfcbeb030daab3bc484888207608d00de637..93ff7bde4166696a07fa7d0fcb617942e7ba895b 100644
--- a/gst/audioparsers/gstflacparse.c
+++ b/gst/audioparsers/gstflacparse.c
@@ -305,6 +305,10 @@ gst_flac_parse_finalize (GObject * object)
     gst_toc_unref (flacparse->toc);
     flacparse->toc = NULL;
   }
+  if (flacparse->seektable) {
+    gst_buffer_unref (flacparse->seektable);
+    flacparse->seektable = NULL;
+  }
 
   g_list_foreach (flacparse->headers, (GFunc) gst_mini_object_unref, NULL);
   g_list_free (flacparse->headers);
@@ -1163,6 +1167,8 @@ gst_flac_parse_handle_seektable (GstFlacParse * flacparse, GstBuffer * buffer)
   GST_DEBUG_OBJECT (flacparse, "storing seektable");
   /* only store for now;
    * offset of the first frame is needed to get real info */
+  if (flacparse->seektable)
+    gst_buffer_unref (flacparse->seektable);
   flacparse->seektable = gst_buffer_ref (buffer);
 
   return TRUE;
diff --git a/gst/auparse/Makefile.am b/gst/auparse/Makefile.am
index 4e8bfd8b35b6d644608a599903ea2c6b78df5764..643aa8ab9fa9a5920c3f7a203d7874b7c5b5e6e4 100644
--- a/gst/auparse/Makefile.am
+++ b/gst/auparse/Makefile.am
@@ -7,17 +7,3 @@ libgstauparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstauparse_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstauparse.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstauparse -:SHARED libgstauparse \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstauparse_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstauparse_la_CFLAGS) \
-	 -:LDFLAGS $(libgstauparse_la_LDFLAGS) \
-	           $(libgstauparse_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/auparse/Makefile.in b/gst/auparse/Makefile.in
index 3922dc676e1dcdce2a77cfa6d27175ea44e7e3fb..e882474e4aa2da572f87233ef229731bfb1bcc98 100644
--- a/gst/auparse/Makefile.in
+++ b/gst/auparse/Makefile.in
@@ -882,20 +882,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstauparse -:SHARED libgstauparse \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstauparse_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstauparse_la_CFLAGS) \
-	 -:LDFLAGS $(libgstauparse_la_LDFLAGS) \
-	           $(libgstauparse_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/autodetect/Makefile.am b/gst/autodetect/Makefile.am
index f67014743ec0e87576871205b8d68219f59f0050..6815c4b9e922c0f18c64a3e908dd59836122f8c6 100644
--- a/gst/autodetect/Makefile.am
+++ b/gst/autodetect/Makefile.am
@@ -17,17 +17,3 @@ noinst_HEADERS = \
 	gstautodetect.h \
 	gstautovideosink.h \
 	gstautovideosrc.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstautodetect -:SHARED libgstautodetect \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstautodetect_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstautodetect_la_CFLAGS) \
-	 -:LDFLAGS $(libgstautodetect_la_LDFLAGS) \
-	           $(libgstautodetect_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/autodetect/Makefile.in b/gst/autodetect/Makefile.in
index d22b4ce58ce6471d06bb8bb85557494a80e9ea69..23118ccde1a5e887823cab1a8aa76a0510b5862e 100644
--- a/gst/autodetect/Makefile.in
+++ b/gst/autodetect/Makefile.in
@@ -930,20 +930,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstautodetect -:SHARED libgstautodetect \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstautodetect_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstautodetect_la_CFLAGS) \
-	 -:LDFLAGS $(libgstautodetect_la_LDFLAGS) \
-	           $(libgstautodetect_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/avi/Makefile.am b/gst/avi/Makefile.am
index 7170e1f7241193f8d2b4483da65ef23fede4a57f..926df2765ff2a1f17703502d701db5934a0546a6 100644
--- a/gst/avi/Makefile.am
+++ b/gst/avi/Makefile.am
@@ -26,17 +26,3 @@ libgstavi_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstavi_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 EXTRA_DIST = README
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstavi -:SHARED libgstavi \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstavi_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstavi_la_CFLAGS) \
-	 -:LDFLAGS $(libgstavi_la_LDFLAGS) \
-	           $(libgstavi_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/avi/Makefile.in b/gst/avi/Makefile.in
index ed187b0633e376467435d129c67c3c3a9a350481..22a14a2b3c531545e989528048ee6271b65c814c 100644
--- a/gst/avi/Makefile.in
+++ b/gst/avi/Makefile.in
@@ -927,20 +927,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstavi -:SHARED libgstavi \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstavi_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstavi_la_CFLAGS) \
-	 -:LDFLAGS $(libgstavi_la_LDFLAGS) \
-	           $(libgstavi_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c
index 225e824cc54b813caff0c23b30ba6fa4a6eb96d7..ae3d74d45f3dd87c4ccda7b626eb37ea30e8d2a2 100644
--- a/gst/avi/gstavimux.c
+++ b/gst/avi/gstavimux.c
@@ -76,8 +76,8 @@ GST_DEBUG_CATEGORY_STATIC (avimux_debug);
 
 enum
 {
-  ARG_0,
-  ARG_BIGFILE
+  PROP_0,
+  PROP_BIGFILE
 };
 
 #define DEFAULT_BIGFILE TRUE
@@ -242,7 +242,7 @@ gst_avi_mux_class_init (GstAviMuxClass * klass)
   gobject_class->set_property = gst_avi_mux_set_property;
   gobject_class->finalize = gst_avi_mux_finalize;
 
-  g_object_class_install_property (gobject_class, ARG_BIGFILE,
+  g_object_class_install_property (gobject_class, PROP_BIGFILE,
       g_param_spec_boolean ("bigfile", "Bigfile Support (>2GB)",
           "Support for openDML-2.0 (big) AVI files", DEFAULT_BIGFILE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
@@ -2217,7 +2217,7 @@ gst_avi_mux_get_property (GObject * object,
   avimux = GST_AVI_MUX (object);
 
   switch (prop_id) {
-    case ARG_BIGFILE:
+    case PROP_BIGFILE:
       g_value_set_boolean (value, avimux->enable_large_avi);
       break;
     default:
@@ -2235,7 +2235,7 @@ gst_avi_mux_set_property (GObject * object,
   avimux = GST_AVI_MUX (object);
 
   switch (prop_id) {
-    case ARG_BIGFILE:
+    case PROP_BIGFILE:
       avimux->enable_large_avi = g_value_get_boolean (value);
       break;
     default:
diff --git a/gst/cutter/Makefile.am b/gst/cutter/Makefile.am
index f72f94651faec2e26fc13d4915ec3ad1d926cb43..a285fabf1671c5d55ad426cec291a25fc5678454 100644
--- a/gst/cutter/Makefile.am
+++ b/gst/cutter/Makefile.am
@@ -9,17 +9,3 @@ libgstcutter_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 noinst_HEADERS = gstcutter.h filter.func
 
 EXTRA_DIST = README
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstcutter -:SHARED libgstcutter \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstcutter_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstcutter_la_CFLAGS) \
-	 -:LDFLAGS $(libgstcutter_la_LDFLAGS) \
-	           $(libgstcutter_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/cutter/Makefile.in b/gst/cutter/Makefile.in
index 54c06494383a8c01d2b6ee2e4d83152c28916f9b..99cca3e77784d2a3206270b9da0b1557519b2c74 100644
--- a/gst/cutter/Makefile.in
+++ b/gst/cutter/Makefile.in
@@ -883,20 +883,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstcutter -:SHARED libgstcutter \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstcutter_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstcutter_la_CFLAGS) \
-	 -:LDFLAGS $(libgstcutter_la_LDFLAGS) \
-	           $(libgstcutter_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/debugutils/Makefile.am b/gst/debugutils/Makefile.am
index 1a953d4b8341a97e1378561681948bf6923751a8..105be36fa64eaa3e5a5f5da0763167b4dec87850 100644
--- a/gst/debugutils/Makefile.am
+++ b/gst/debugutils/Makefile.am
@@ -39,17 +39,3 @@ libgstdebug_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS)
 libgstdebug_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
 libgstdebug_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstdebug_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstdebug -:SHARED libgstdebug \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstdebug_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdebug_la_CFLAGS) \
-	 -:LDFLAGS $(libgstdebug_la_LDFLAGS) \
-	           $(libgstdebug_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/debugutils/Makefile.in b/gst/debugutils/Makefile.in
index 1b55caeb0b2902ff4fd5493bbd3fffa373802213..adffb8977b22649b23edad2ba036fa68e6fd697b 100644
--- a/gst/debugutils/Makefile.in
+++ b/gst/debugutils/Makefile.in
@@ -1023,20 +1023,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstdebug -:SHARED libgstdebug \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstdebug_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdebug_la_CFLAGS) \
-	 -:LDFLAGS $(libgstdebug_la_LDFLAGS) \
-	           $(libgstdebug_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/debugutils/breakmydata.c b/gst/debugutils/breakmydata.c
index c7306b10d17c6d4ef39dae81722e9afb906ef965..7fe01b60c4d8424a947ba7118664a9f254402777 100644
--- a/gst/debugutils/breakmydata.c
+++ b/gst/debugutils/breakmydata.c
@@ -49,11 +49,11 @@ GType gst_break_my_data_get_type (void);
 
 enum
 {
-  ARG_0,
-  ARG_SEED,
-  ARG_SET_TO,
-  ARG_SKIP,
-  ARG_PROBABILITY
+  PROP_0,
+  PROP_SEED,
+  PROP_SET_TO,
+  PROP_SKIP,
+  PROP_PROBABILITY
 };
 
 typedef struct _GstBreakMyData GstBreakMyData;
@@ -118,22 +118,22 @@ gst_break_my_data_class_init (GstBreakMyDataClass * klass)
   gobject_class->set_property = gst_break_my_data_set_property;
   gobject_class->get_property = gst_break_my_data_get_property;
 
-  g_object_class_install_property (gobject_class, ARG_SEED,
+  g_object_class_install_property (gobject_class, PROP_SEED,
       g_param_spec_uint ("seed", "seed",
           "seed for randomness (initialized when going from READY to PAUSED)",
           0, G_MAXUINT32, 0,
           G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_SET_TO,
+  g_object_class_install_property (gobject_class, PROP_SET_TO,
       g_param_spec_int ("set-to", "set-to",
           "set changed bytes to this value (-1 means random value",
           -1, G_MAXUINT8, -1,
           G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_SKIP,
+  g_object_class_install_property (gobject_class, PROP_SKIP,
       g_param_spec_uint ("skip", "skip",
           "amount of bytes skipped at the beginning of stream",
           0, G_MAXUINT, 0,
           G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_PROBABILITY,
+  g_object_class_install_property (gobject_class, PROP_PROBABILITY,
       g_param_spec_double ("probability", "probability",
           "probability for each byte in the buffer to be changed", 0.0, 1.0,
           0.0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
@@ -168,16 +168,16 @@ gst_break_my_data_set_property (GObject * object, guint prop_id,
   GST_OBJECT_LOCK (bmd);
 
   switch (prop_id) {
-    case ARG_SEED:
+    case PROP_SEED:
       bmd->seed = g_value_get_uint (value);
       break;
-    case ARG_SET_TO:
+    case PROP_SET_TO:
       bmd->set = g_value_get_int (value);
       break;
-    case ARG_SKIP:
+    case PROP_SKIP:
       bmd->skip = g_value_get_uint (value);
       break;
-    case ARG_PROBABILITY:
+    case PROP_PROBABILITY:
       bmd->probability = g_value_get_double (value);
       break;
     default:
@@ -197,16 +197,16 @@ gst_break_my_data_get_property (GObject * object, guint prop_id, GValue * value,
   GST_OBJECT_LOCK (bmd);
 
   switch (prop_id) {
-    case ARG_SEED:
+    case PROP_SEED:
       g_value_set_uint (value, bmd->seed);
       break;
-    case ARG_SET_TO:
+    case PROP_SET_TO:
       g_value_set_int (value, bmd->set);
       break;
-    case ARG_SKIP:
+    case PROP_SKIP:
       g_value_set_uint (value, bmd->skip);
       break;
-    case ARG_PROBABILITY:
+    case PROP_PROBABILITY:
       g_value_set_double (value, bmd->probability);
       break;
     default:
diff --git a/gst/debugutils/cpureport.c b/gst/debugutils/cpureport.c
index 85cc294780bf0d2fdb1e0384395106be16dfb96f..670794d71ad58177ec02f273a9193edd2086a731 100644
--- a/gst/debugutils/cpureport.c
+++ b/gst/debugutils/cpureport.c
@@ -31,7 +31,7 @@
 
 enum
 {
-  ARG_0,
+  PROP_0,
 };
 
 GstStaticPadTemplate cpu_report_src_template = GST_STATIC_PAD_TEMPLATE ("src",
diff --git a/gst/debugutils/gstnavseek.c b/gst/debugutils/gstnavseek.c
index b6fae2e065659fa5684b4ea73ede34131db1f1ba..a38b608f4e2f42f0aa8044b0a4830366d909f4a1 100644
--- a/gst/debugutils/gstnavseek.c
+++ b/gst/debugutils/gstnavseek.c
@@ -33,8 +33,8 @@
 
 enum
 {
-  ARG_0,
-  ARG_SEEKOFFSET
+  PROP_0,
+  PROP_SEEKOFFSET
 };
 
 GstStaticPadTemplate navseek_src_template = GST_STATIC_PAD_TEMPLATE ("src",
@@ -80,7 +80,7 @@ gst_navseek_class_init (GstNavSeekClass * klass)
   gobject_class->get_property = gst_navseek_get_property;
 
   g_object_class_install_property (gobject_class,
-      ARG_SEEKOFFSET, g_param_spec_double ("seek-offset", "Seek Offset",
+      PROP_SEEKOFFSET, g_param_spec_double ("seek-offset", "Seek Offset",
           "Time in seconds to seek by", 0.0, G_MAXDOUBLE, 5.0,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
@@ -302,7 +302,7 @@ gst_navseek_set_property (GObject * object, guint prop_id,
   GstNavSeek *navseek = GST_NAVSEEK (object);
 
   switch (prop_id) {
-    case ARG_SEEKOFFSET:
+    case PROP_SEEKOFFSET:
       GST_OBJECT_LOCK (navseek);
       navseek->seek_offset = g_value_get_double (value);
       GST_OBJECT_UNLOCK (navseek);
@@ -320,7 +320,7 @@ gst_navseek_get_property (GObject * object, guint prop_id,
   GstNavSeek *navseek = GST_NAVSEEK (object);
 
   switch (prop_id) {
-    case ARG_SEEKOFFSET:
+    case PROP_SEEKOFFSET:
       GST_OBJECT_LOCK (navseek);
       g_value_set_double (value, navseek->seek_offset);
       GST_OBJECT_UNLOCK (navseek);
diff --git a/gst/debugutils/progressreport.c b/gst/debugutils/progressreport.c
index 859e4b950c5040b8a36becb141e9833faf0d02d6..7dd05dc733f0b8965e55d7298d819fa4bf6b4c9a 100644
--- a/gst/debugutils/progressreport.c
+++ b/gst/debugutils/progressreport.c
@@ -78,11 +78,11 @@
 
 enum
 {
-  ARG_0,
-  ARG_UPDATE_FREQ,
-  ARG_SILENT,
-  ARG_DO_QUERY,
-  ARG_FORMAT
+  PROP_0,
+  PROP_UPDATE_FREQ,
+  PROP_SILENT,
+  PROP_DO_QUERY,
+  PROP_FORMAT
 };
 
 GstStaticPadTemplate progress_report_src_template =
@@ -145,23 +145,23 @@ gst_progress_report_class_init (GstProgressReportClass * g_class)
   gobject_class->get_property = gst_progress_report_get_property;
 
   g_object_class_install_property (gobject_class,
-      ARG_UPDATE_FREQ, g_param_spec_int ("update-freq", "Update Frequency",
+      PROP_UPDATE_FREQ, g_param_spec_int ("update-freq", "Update Frequency",
           "Number of seconds between reports when data is flowing", 1, G_MAXINT,
           DEFAULT_UPDATE_FREQ, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (gobject_class,
-      ARG_SILENT, g_param_spec_boolean ("silent",
+      PROP_SILENT, g_param_spec_boolean ("silent",
           "Do not print output to stdout", "Do not print output to stdout",
           DEFAULT_SILENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (gobject_class,
-      ARG_DO_QUERY, g_param_spec_boolean ("do-query",
+      PROP_DO_QUERY, g_param_spec_boolean ("do-query",
           "Use a query instead of buffer metadata to determine stream position",
           "Use a query instead of buffer metadata to determine stream position",
           DEFAULT_DO_QUERY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (gobject_class,
-      ARG_FORMAT, g_param_spec_string ("format", "format",
+      PROP_FORMAT, g_param_spec_string ("format", "format",
           "Format to use for the querying", DEFAULT_FORMAT,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
@@ -452,22 +452,22 @@ gst_progress_report_set_property (GObject * object, guint prop_id,
   filter = GST_PROGRESS_REPORT (object);
 
   switch (prop_id) {
-    case ARG_UPDATE_FREQ:
+    case PROP_UPDATE_FREQ:
       GST_OBJECT_LOCK (filter);
       filter->update_freq = g_value_get_int (value);
       GST_OBJECT_UNLOCK (filter);
       break;
-    case ARG_SILENT:
+    case PROP_SILENT:
       GST_OBJECT_LOCK (filter);
       filter->silent = g_value_get_boolean (value);
       GST_OBJECT_UNLOCK (filter);
       break;
-    case ARG_DO_QUERY:
+    case PROP_DO_QUERY:
       GST_OBJECT_LOCK (filter);
       filter->do_query = g_value_get_boolean (value);
       GST_OBJECT_UNLOCK (filter);
       break;
-    case ARG_FORMAT:
+    case PROP_FORMAT:
       GST_OBJECT_LOCK (filter);
       g_free (filter->format);
       filter->format = g_value_dup_string (value);
@@ -489,22 +489,22 @@ gst_progress_report_get_property (GObject * object, guint prop_id,
   filter = GST_PROGRESS_REPORT (object);
 
   switch (prop_id) {
-    case ARG_UPDATE_FREQ:
+    case PROP_UPDATE_FREQ:
       GST_OBJECT_LOCK (filter);
       g_value_set_int (value, filter->update_freq);
       GST_OBJECT_UNLOCK (filter);
       break;
-    case ARG_SILENT:
+    case PROP_SILENT:
       GST_OBJECT_LOCK (filter);
       g_value_set_boolean (value, filter->silent);
       GST_OBJECT_UNLOCK (filter);
       break;
-    case ARG_DO_QUERY:
+    case PROP_DO_QUERY:
       GST_OBJECT_LOCK (filter);
       g_value_set_boolean (value, filter->do_query);
       GST_OBJECT_UNLOCK (filter);
       break;
-    case ARG_FORMAT:
+    case PROP_FORMAT:
       GST_OBJECT_LOCK (filter);
       g_value_set_string (value, filter->format);
       GST_OBJECT_UNLOCK (filter);
diff --git a/gst/debugutils/rndbuffersize.c b/gst/debugutils/rndbuffersize.c
index 009f833bd598e226e208cae3841cdb07a348e240..9ebd12c5d01a61e00c32369ca7da35078283cbbd 100644
--- a/gst/debugutils/rndbuffersize.c
+++ b/gst/debugutils/rndbuffersize.c
@@ -65,9 +65,9 @@ struct _GstRndBufferSizeClass
 
 enum
 {
-  ARG_SEED = 1,
-  ARG_MINIMUM,
-  ARG_MAXIMUM
+  PROP_SEED = 1,
+  PROP_MINIMUM,
+  PROP_MAXIMUM
 };
 
 #define DEFAULT_SEED 0
@@ -132,16 +132,16 @@ gst_rnd_buffer_size_class_init (GstRndBufferSizeClass * klass)
   gstelement_class->change_state =
       GST_DEBUG_FUNCPTR (gst_rnd_buffer_size_change_state);
 
-  g_object_class_install_property (gobject_class, ARG_SEED,
+  g_object_class_install_property (gobject_class, PROP_SEED,
       g_param_spec_uint ("seed", "random number seed",
           "seed for randomness (initialized when going from READY to PAUSED)",
           0, G_MAXUINT32, DEFAULT_SEED,
           G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_MINIMUM,
+  g_object_class_install_property (gobject_class, PROP_MINIMUM,
       g_param_spec_int ("min", "mininum", "mininum buffer size",
           0, G_MAXINT32, DEFAULT_MIN,
           G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_MAXIMUM,
+  g_object_class_install_property (gobject_class, PROP_MAXIMUM,
       g_param_spec_int ("max", "maximum", "maximum buffer size",
           1, G_MAXINT32, DEFAULT_MAX,
           G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
@@ -195,13 +195,13 @@ gst_rnd_buffer_size_set_property (GObject * object, guint prop_id,
   GstRndBufferSize *self = GST_RND_BUFFER_SIZE (object);
 
   switch (prop_id) {
-    case ARG_SEED:
+    case PROP_SEED:
       self->seed = g_value_get_uint (value);
       break;
-    case ARG_MINIMUM:
+    case PROP_MINIMUM:
       self->min = g_value_get_int (value);
       break;
-    case ARG_MAXIMUM:
+    case PROP_MAXIMUM:
       self->max = g_value_get_int (value);
       break;
     default:
@@ -218,13 +218,13 @@ gst_rnd_buffer_size_get_property (GObject * object, guint prop_id,
   GstRndBufferSize *self = GST_RND_BUFFER_SIZE (object);
 
   switch (prop_id) {
-    case ARG_SEED:
+    case PROP_SEED:
       g_value_set_uint (value, self->seed);
       break;
-    case ARG_MINIMUM:
+    case PROP_MINIMUM:
       g_value_set_int (value, self->min);
       break;
-    case ARG_MAXIMUM:
+    case PROP_MAXIMUM:
       g_value_set_int (value, self->max);
       break;
     default:
diff --git a/gst/deinterlace/Makefile.am b/gst/deinterlace/Makefile.am
index 7d5dbb00fd3e1ef5e8ba5b43685ddfdcd6a541c7..c0f4fa9b950f94cdb7a0e6e3f0eb26fc4d50fbec 100644
--- a/gst/deinterlace/Makefile.am
+++ b/gst/deinterlace/Makefile.am
@@ -51,18 +51,3 @@ noinst_HEADERS = \
 	tvtime/tomsmocomp/TomsMoCompAll.inc \
 	tvtime/tomsmocomp/tomsmocompmacros.h \
 	tvtime/tomsmocomp/WierdBob.inc
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstdeinterlace -:SHARED libgstdeinterlace \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstdeinterlace_la_SOURCES) \
-	 	   $(nodist_libgstdeinterlace_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdeinterlace_la_CFLAGS) \
-	 -:LDFLAGS $(libgstdeinterlace_la_LDFLAGS) \
-	           $(libgstdeinterlace_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/deinterlace/Makefile.in b/gst/deinterlace/Makefile.in
index b6b3a855183c20f237bf6f1bdfbdfde49277fd3b..926ab5d0de29ce053e366f6a09edcc81569ba54d 100644
--- a/gst/deinterlace/Makefile.in
+++ b/gst/deinterlace/Makefile.in
@@ -1148,21 +1148,6 @@ dist-hook-orc: tmp-orc.c $(ORC_SOURCE).h
 	cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c
 	cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstdeinterlace -:SHARED libgstdeinterlace \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstdeinterlace_la_SOURCES) \
-	 	   $(nodist_libgstdeinterlace_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdeinterlace_la_CFLAGS) \
-	 -:LDFLAGS $(libgstdeinterlace_la_LDFLAGS) \
-	           $(libgstdeinterlace_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c
index 9a89f5c4d415dd880e2511705066dbc3835dcc05..f0e0f317e5c559abc670430de27f6cfc5e640fd4 100644
--- a/gst/deinterlace/gstdeinterlace.c
+++ b/gst/deinterlace/gstdeinterlace.c
@@ -75,8 +75,7 @@ enum
   PROP_FIELD_LAYOUT,
   PROP_LOCKING,
   PROP_IGNORE_OBSCURE,
-  PROP_DROP_ORPHANS,
-  PROP_LAST
+  PROP_DROP_ORPHANS
 };
 
 #define GST_DEINTERLACE_BUFFER_STATE_P    (1<<0)
diff --git a/gst/deinterlace/tvtime-dist.c b/gst/deinterlace/tvtime-dist.c
index d92ce306fa975c1b3695bfdbe111edc1fb3a51e5..9ac33461deb5ef33f5ad689f229d9f1be24ca001 100644
--- a/gst/deinterlace/tvtime-dist.c
+++ b/gst/deinterlace/tvtime-dist.c
@@ -713,7 +713,7 @@ deinterlace_line_linear_blend (guint8 * ORC_RESTRICT d1,
       static const orc_uint8 bc[] = {
         1, 9, 29, 100, 101, 105, 110, 116, 101, 114, 108, 97, 99, 101, 95, 108,
         105, 110, 101, 95, 108, 105, 110, 101, 97, 114, 95, 98, 108, 101, 110,
-            100,
+        100,
         11, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 2, 2, 0,
         0, 0, 20, 2, 20, 2, 20, 2, 150, 32, 4, 150, 33, 5, 150, 34,
         6, 70, 32, 32, 33, 70, 34, 34, 34, 70, 32, 32, 34, 70, 32, 32,
diff --git a/gst/dtmf/Makefile.am b/gst/dtmf/Makefile.am
index f5d36edd5a0244ac287a805047f52eafec1223dc..464b90c25aa28bd682c9d6c4ca07cb795599a65b 100644
--- a/gst/dtmf/Makefile.am
+++ b/gst/dtmf/Makefile.am
@@ -15,17 +15,3 @@ libgstdtmf_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstrtp-@GST_API_VERSION@ \
 	$(GST_BASE_LIBS) $(GST_LIBS) $(LIBM)
 libgstdtmf_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstdtmf_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstdtmf -:SHARED libgstdtmf \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstdtmf_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdtmf_la_CFLAGS) \
-	 -:LDFLAGS $(libgstdtmf_la_LDFLAGS) \
-	           $(libgstdtmf_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/dtmf/Makefile.in b/gst/dtmf/Makefile.in
index 2debf60790c7bc7e151ac4575e1b2fe1bc663369..7af3f463d01eee4cf255e8a6b41702a6b078bbad 100644
--- a/gst/dtmf/Makefile.in
+++ b/gst/dtmf/Makefile.in
@@ -919,20 +919,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstdtmf -:SHARED libgstdtmf \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstdtmf_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstdtmf_la_CFLAGS) \
-	 -:LDFLAGS $(libgstdtmf_la_LDFLAGS) \
-	           $(libgstdtmf_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/dtmf/gstrtpdtmfdepay.c b/gst/dtmf/gstrtpdtmfdepay.c
index 01c039ce3f7799e83c3e0401a0bdd8639ad9c72b..f625ac5adef23c507dc221c3a53f4fe46cfc2678 100644
--- a/gst/dtmf/gstrtpdtmfdepay.c
+++ b/gst/dtmf/gstrtpdtmfdepay.c
@@ -158,8 +158,6 @@ GST_DEBUG_CATEGORY_STATIC (gst_rtp_dtmf_depay_debug);
 
 enum
 {
-
-
   /* FILL ME */
   LAST_SIGNAL
 };
@@ -171,11 +169,6 @@ enum
   PROP_MAX_DURATION
 };
 
-enum
-{
-  ARG_0
-};
-
 static GstStaticPadTemplate gst_rtp_dtmf_depay_src_template =
 GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
diff --git a/gst/effectv/Makefile.am b/gst/effectv/Makefile.am
index d09111d62718bf663cf81a54d225a062e381dec7..14dff1d0bf921883eaca1eec95c5ac6a4740035e 100644
--- a/gst/effectv/Makefile.am
+++ b/gst/effectv/Makefile.am
@@ -20,17 +20,3 @@ libgsteffectv_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 noinst_HEADERS = gsteffectv.h gstaging.h gstdice.h gstedge.h \
         gstquark.h gstrev.h gstshagadelic.h gstvertigo.h gstwarp.h gstop.h \
 	gstradioac.h gststreak.h gstripple.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsteffectv -:SHARED libgsteffectv \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsteffectv_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsteffectv_la_CFLAGS) \
-	 -:LDFLAGS $(libgsteffectv_la_LDFLAGS) \
-	           $(libgsteffectv_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/effectv/Makefile.in b/gst/effectv/Makefile.in
index a879f37b55ebef78ddd26e7d1606bad0eb17a9ed..2b26f90fc985096396a583d8ae1cecd5f7ade1b9 100644
--- a/gst/effectv/Makefile.in
+++ b/gst/effectv/Makefile.in
@@ -1003,20 +1003,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsteffectv -:SHARED libgsteffectv \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsteffectv_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsteffectv_la_CFLAGS) \
-	 -:LDFLAGS $(libgsteffectv_la_LDFLAGS) \
-	           $(libgsteffectv_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/effectv/gstquark.c b/gst/effectv/gstquark.c
index cb02643fe9bc68544fe1f001360bf747f9f8781a..098e20c5a55f21cb582e7bc0960ac0f82c742f3f 100644
--- a/gst/effectv/gstquark.c
+++ b/gst/effectv/gstquark.c
@@ -272,7 +272,7 @@ gst_quarktv_class_init (GstQuarkTVClass * klass)
 
   g_object_class_install_property (gobject_class, PROP_PLANES,
       g_param_spec_int ("planes", "Planes",
-          "Number of planes", 0, 64, PLANES,
+          "Number of planes", 1, 64, PLANES,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
 
   gst_element_class_set_static_metadata (gstelement_class, "QuarkTV effect",
diff --git a/gst/equalizer/Makefile.am b/gst/equalizer/Makefile.am
index 9f92a9ee4d8585550c56bb5ff1051114fe8839a9..8ce4b788ac88c1009411ace7e466ddaf303b10e2 100644
--- a/gst/equalizer/Makefile.am
+++ b/gst/equalizer/Makefile.am
@@ -20,17 +20,3 @@ presetdir = $(datadir)/gstreamer-$(GST_API_VERSION)/presets
 preset_DATA = GstIirEqualizer3Bands.prs GstIirEqualizer10Bands.prs
 
 EXTRA_DIST = $(preset_DATA)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstequalizer -:SHARED libgstequalizer \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstequalizer_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstequalizer_la_CFLAGS) \
-	 -:LDFLAGS $(libgstequalizer_la_LDFLAGS) \
-	           $(libgstequalizer_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/equalizer/Makefile.in b/gst/equalizer/Makefile.in
index f69929fbf6fd7d36dedd6a452f9cbb80928882a3..c8a10f0d9b917cd4044836324371a1bbeba669fd 100644
--- a/gst/equalizer/Makefile.in
+++ b/gst/equalizer/Makefile.in
@@ -946,20 +946,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES uninstall-presetDATA
 	uninstall-am uninstall-pluginLTLIBRARIES uninstall-presetDATA
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstequalizer -:SHARED libgstequalizer \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstequalizer_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstequalizer_la_CFLAGS) \
-	 -:LDFLAGS $(libgstequalizer_la_LDFLAGS) \
-	           $(libgstequalizer_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/equalizer/gstiirequalizer.c b/gst/equalizer/gstiirequalizer.c
index e912ca52fd9db69349ccf497d035330df37e2913..eb23d21f357efa08b59b5853b1dbe62c0e80e767 100644
--- a/gst/equalizer/gstiirequalizer.c
+++ b/gst/equalizer/gstiirequalizer.c
@@ -49,6 +49,7 @@ static gboolean gst_iir_equalizer_setup (GstAudioFilter * filter,
     const GstAudioInfo * info);
 static GstFlowReturn gst_iir_equalizer_transform_ip (GstBaseTransform * btrans,
     GstBuffer * buf);
+static void set_passthrough (GstIirEqualizer * equ);
 
 #define ALLOWED_CAPS \
     "audio/x-raw,"                                                \
@@ -159,6 +160,7 @@ gst_iir_equalizer_band_set_property (GObject * object, guint prop_id,
         BANDS_LOCK (equ);
         equ->need_new_coefficients = TRUE;
         band->gain = gain;
+        set_passthrough (equ);
         BANDS_UNLOCK (equ);
         GST_DEBUG_OBJECT (band, "changed gain = %lf ", band->gain);
       }
@@ -373,7 +375,8 @@ static void
 gst_iir_equalizer_init (GstIirEqualizer * eq)
 {
   g_mutex_init (&eq->bands_lock);
-  eq->need_new_coefficients = TRUE;
+  /* Band gains are 0 by default, passthrough until they are changed */
+  gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (eq), TRUE);
 }
 
 static void
@@ -852,7 +855,6 @@ gst_iir_equalizer_transform_ip (GstBaseTransform * btrans, GstBuffer * buf)
   BANDS_LOCK (equ);
   if (need_new_coefficients) {
     update_coefficients (equ);
-    set_passthrough (equ);
   }
   BANDS_UNLOCK (equ);
 
diff --git a/gst/flv/Makefile.am b/gst/flv/Makefile.am
index e6e6578992a7d72c951b23e45287bb10e6ee81cc..b396743805acd981fec472b3eddabf4ff735c672 100644
--- a/gst/flv/Makefile.am
+++ b/gst/flv/Makefile.am
@@ -11,17 +11,3 @@ libgstflv_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 noinst_HEADERS = gstflvdemux.h gstflvmux.h amfdefs.h gstindex.h
 
 EXTRA_DIST = gstindex.c gstmemindex.c
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstflv -:SHARED libgstflv \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstflv_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstflv_la_CFLAGS) \
-	 -:LDFLAGS $(libgstflv_la_LDFLAGS) \
-	           $(libgstflv_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/flv/Makefile.in b/gst/flv/Makefile.in
index ff636bb9c943b349f20116196d4983417f3703ac..84b4254d563c5fdebc2ef668e120f623ad44a4d4 100644
--- a/gst/flv/Makefile.in
+++ b/gst/flv/Makefile.in
@@ -895,20 +895,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstflv -:SHARED libgstflv \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstflv_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstflv_la_CFLAGS) \
-	 -:LDFLAGS $(libgstflv_la_LDFLAGS) \
-	           $(libgstflv_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c
index ec8f78bc81973bd948eec81c50cb451dd5a3fd4c..afa1490b3027fe34e668690e05f6244ecc424bbe 100644
--- a/gst/flv/gstflvdemux.c
+++ b/gst/flv/gstflvdemux.c
@@ -663,7 +663,7 @@ static gboolean
 gst_flv_demux_audio_negotiate (GstFlvDemux * demux, guint32 codec_tag,
     guint32 rate, guint32 channels, guint32 width)
 {
-  GstCaps *caps = NULL;
+  GstCaps *caps = NULL, *old_caps;
   gchar *codec_name = NULL;
   gboolean ret = FALSE;
   guint adjusted_rate = rate;
@@ -704,29 +704,32 @@ gst_flv_demux_audio_negotiate (GstFlvDemux * demux, guint32 codec_tag,
       break;
     case 10:
     {
-      if (demux->audio_codec_data) {
-        GstMapInfo map;
+      GstMapInfo map;
+      if (!demux->audio_codec_data) {
+        GST_DEBUG_OBJECT (demux, "don't have AAC codec data yet");
+        ret = TRUE;
+        goto done;
+      }
 
-        gst_buffer_map (demux->audio_codec_data, &map, GST_MAP_READ);
+      gst_buffer_map (demux->audio_codec_data, &map, GST_MAP_READ);
 
-        /* use codec-data to extract and verify samplerate */
-        if (map.size >= 2) {
-          gint freq_index;
+      /* use codec-data to extract and verify samplerate */
+      if (map.size >= 2) {
+        gint freq_index;
 
-          freq_index = GST_READ_UINT16_BE (map.data);
-          freq_index = (freq_index & 0x0780) >> 7;
-          adjusted_rate =
-              gst_codec_utils_aac_get_sample_rate_from_index (freq_index);
+        freq_index = GST_READ_UINT16_BE (map.data);
+        freq_index = (freq_index & 0x0780) >> 7;
+        adjusted_rate =
+            gst_codec_utils_aac_get_sample_rate_from_index (freq_index);
 
-          if (adjusted_rate && (rate != adjusted_rate)) {
-            GST_LOG_OBJECT (demux, "Ajusting AAC sample rate %d -> %d", rate,
-                adjusted_rate);
-          } else {
-            adjusted_rate = rate;
-          }
+        if (adjusted_rate && (rate != adjusted_rate)) {
+          GST_LOG_OBJECT (demux, "Ajusting AAC sample rate %d -> %d", rate,
+              adjusted_rate);
+        } else {
+          adjusted_rate = rate;
         }
-        gst_buffer_unmap (demux->audio_codec_data, &map);
       }
+      gst_buffer_unmap (demux->audio_codec_data, &map);
 
       caps = gst_caps_new_simple ("audio/mpeg",
           "mpegversion", G_TYPE_INT, 4, "framed", G_TYPE_BOOLEAN, TRUE,
@@ -811,18 +814,27 @@ gst_flv_demux_audio_negotiate (GstFlvDemux * demux, guint32 codec_tag,
         demux->audio_codec_data, NULL);
   }
 
-  stream_id =
-      gst_pad_create_stream_id (demux->audio_pad, GST_ELEMENT_CAST (demux),
-      "audio");
+  old_caps = gst_pad_get_current_caps (demux->audio_pad);
+  if (!old_caps) {
+    stream_id =
+        gst_pad_create_stream_id (demux->audio_pad, GST_ELEMENT_CAST (demux),
+        "audio");
 
-  event = gst_event_new_stream_start (stream_id);
-  if (have_group_id (demux))
-    gst_event_set_group_id (event, demux->group_id);
-  gst_pad_push_event (demux->audio_pad, event);
-  g_free (stream_id);
+    event = gst_event_new_stream_start (stream_id);
+    if (have_group_id (demux))
+      gst_event_set_group_id (event, demux->group_id);
+    gst_pad_push_event (demux->audio_pad, event);
+    g_free (stream_id);
+  }
+  if (!old_caps || !gst_caps_is_equal (old_caps, caps))
+    ret = gst_pad_set_caps (demux->audio_pad, caps);
+  else
+    ret = TRUE;
 
-  ret = gst_pad_set_caps (demux->audio_pad, caps);
+  if (old_caps)
+    gst_caps_unref (old_caps);
 
+done:
   if (G_LIKELY (ret)) {
     /* Store the caps we got from tags */
     demux->audio_codec_tag = codec_tag;
@@ -830,24 +842,29 @@ gst_flv_demux_audio_negotiate (GstFlvDemux * demux, guint32 codec_tag,
     demux->channels = channels;
     demux->width = width;
 
-    codec_name = gst_pb_utils_get_codec_description (caps);
+    if (caps) {
+      codec_name = gst_pb_utils_get_codec_description (caps);
 
-    if (codec_name) {
-      if (demux->taglist == NULL)
-        demux->taglist = gst_tag_list_new_empty ();
-      gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE,
-          GST_TAG_AUDIO_CODEC, codec_name, NULL);
-      g_free (codec_name);
-    }
+      if (codec_name) {
+        if (demux->taglist == NULL)
+          demux->taglist = gst_tag_list_new_empty ();
+        gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE,
+            GST_TAG_AUDIO_CODEC, codec_name, NULL);
+        g_free (codec_name);
+      }
 
-    GST_DEBUG_OBJECT (demux->audio_pad, "successfully negotiated caps %"
-        GST_PTR_FORMAT, caps);
+      GST_DEBUG_OBJECT (demux->audio_pad, "successfully negotiated caps %"
+          GST_PTR_FORMAT, caps);
+    } else {
+      GST_DEBUG_OBJECT (demux->audio_pad, "delayed setting caps");
+    }
   } else {
     GST_WARNING_OBJECT (demux->audio_pad, "failed negotiating caps %"
         GST_PTR_FORMAT, caps);
   }
 
-  gst_caps_unref (caps);
+  if (caps)
+    gst_caps_unref (caps);
 
 beach:
   return ret;
@@ -927,16 +944,18 @@ gst_flv_demux_parse_tag_audio (GstFlvDemux * demux, GstBuffer * buffer)
 
   GST_LOG_OBJECT (demux, "parsing an audio tag");
 
-  if G_UNLIKELY (!demux->audio_pad && demux->no_more_pads) {
+  if G_UNLIKELY
+    (!demux->audio_pad && demux->no_more_pads) {
 #ifndef GST_DISABLE_DEBUG
-    if G_UNLIKELY (!demux->no_audio_warned) {
+    if G_UNLIKELY
+      (!demux->no_audio_warned) {
       GST_WARNING_OBJECT (demux,
           "Signaled no-more-pads already but had no audio pad -- ignoring");
       demux->no_audio_warned = TRUE;
-    }
+      }
 #endif
     return GST_FLOW_OK;
-  }
+    }
 
   g_return_val_if_fail (gst_buffer_get_size (buffer) == demux->tag_size,
       GST_FLOW_ERROR);
@@ -1066,6 +1085,8 @@ gst_flv_demux_parse_tag_audio (GstFlvDemux * demux, GstBuffer * buffer)
           codec_tag != demux->audio_codec_tag || width != demux->width)) {
     GST_DEBUG_OBJECT (demux, "audio settings have changed, changing caps");
 
+    gst_buffer_replace (&demux->audio_codec_data, NULL);
+
     /* Negotiate caps */
     if (!gst_flv_demux_audio_negotiate (demux, codec_tag, rate, channels,
             width)) {
@@ -1105,6 +1126,12 @@ gst_flv_demux_parse_tag_audio (GstFlvDemux * demux, GstBuffer * buffer)
         goto beach;
       }
       case 1:
+        if (!demux->audio_codec_data) {
+          GST_ERROR_OBJECT (demux, "got AAC audio packet before codec data");
+          ret = GST_FLOW_OK;
+          gst_buffer_unref (outbuf);
+          goto beach;
+        }
         /* AAC raw packet */
         GST_LOG_OBJECT (demux, "got a raw AAC audio packet");
         break;
@@ -1203,7 +1230,8 @@ gst_flv_demux_parse_tag_audio (GstFlvDemux * demux, GstBuffer * buffer)
     goto beach;
   }
 
-  ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret);
+  ret = gst_flow_combiner_update_pad_flow (demux->flowcombiner,
+      demux->audio_pad, ret);
 
 beach:
   gst_buffer_unmap (buffer, &map);
@@ -1215,7 +1243,7 @@ static gboolean
 gst_flv_demux_video_negotiate (GstFlvDemux * demux, guint32 codec_tag)
 {
   gboolean ret = FALSE;
-  GstCaps *caps = NULL;
+  GstCaps *caps = NULL, *old_caps;
   gchar *codec_name = NULL;
   GstEvent *event;
   gchar *stream_id;
@@ -1237,6 +1265,11 @@ gst_flv_demux_video_negotiate (GstFlvDemux * demux, guint32 codec_tag)
       caps = gst_caps_new_empty_simple ("video/x-vp6-alpha");
       break;
     case 7:
+      if (!demux->video_codec_data) {
+        GST_DEBUG_OBJECT (demux, "don't have h264 codec data yet");
+        ret = TRUE;
+        goto done;
+      }
       caps =
           gst_caps_new_simple ("video/x-h264", "stream-format", G_TYPE_STRING,
           "avc", NULL);
@@ -1277,39 +1310,55 @@ gst_flv_demux_video_negotiate (GstFlvDemux * demux, guint32 codec_tag)
         demux->video_codec_data, NULL);
   }
 
-  stream_id =
-      gst_pad_create_stream_id (demux->video_pad, GST_ELEMENT_CAST (demux),
-      "video");
-  event = gst_event_new_stream_start (stream_id);
-  g_free (stream_id);
+  old_caps = gst_pad_get_current_caps (demux->video_pad);
+  if (!old_caps) {
+    stream_id =
+        gst_pad_create_stream_id (demux->video_pad, GST_ELEMENT_CAST (demux),
+        "video");
+    event = gst_event_new_stream_start (stream_id);
+    g_free (stream_id);
 
-  if (have_group_id (demux))
-    gst_event_set_group_id (event, demux->group_id);
-  gst_pad_push_event (demux->video_pad, event);
-  ret = gst_pad_set_caps (demux->video_pad, caps);
+    if (have_group_id (demux))
+      gst_event_set_group_id (event, demux->group_id);
+    gst_pad_push_event (demux->video_pad, event);
+  }
+
+  if (!old_caps || !gst_caps_is_equal (old_caps, caps))
+    ret = gst_pad_set_caps (demux->video_pad, caps);
+  else
+    ret = TRUE;
 
+  if (old_caps)
+    gst_caps_unref (old_caps);
+
+done:
   if (G_LIKELY (ret)) {
     /* Store the caps we have set */
     demux->video_codec_tag = codec_tag;
 
-    codec_name = gst_pb_utils_get_codec_description (caps);
+    if (caps) {
+      codec_name = gst_pb_utils_get_codec_description (caps);
 
-    if (codec_name) {
-      if (demux->taglist == NULL)
-        demux->taglist = gst_tag_list_new_empty ();
-      gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE,
-          GST_TAG_VIDEO_CODEC, codec_name, NULL);
-      g_free (codec_name);
-    }
+      if (codec_name) {
+        if (demux->taglist == NULL)
+          demux->taglist = gst_tag_list_new_empty ();
+        gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE,
+            GST_TAG_VIDEO_CODEC, codec_name, NULL);
+        g_free (codec_name);
+      }
 
-    GST_DEBUG_OBJECT (demux->video_pad, "successfully negotiated caps %"
-        GST_PTR_FORMAT, caps);
+      GST_DEBUG_OBJECT (demux->video_pad, "successfully negotiated caps %"
+          GST_PTR_FORMAT, caps);
+    } else {
+      GST_DEBUG_OBJECT (demux->video_pad, "delayed setting caps");
+    }
   } else {
     GST_WARNING_OBJECT (demux->video_pad, "failed negotiating caps %"
         GST_PTR_FORMAT, caps);
   }
 
-  gst_caps_unref (caps);
+  if (caps)
+    gst_caps_unref (caps);
 
 beach:
   return ret;
@@ -1332,16 +1381,18 @@ gst_flv_demux_parse_tag_video (GstFlvDemux * demux, GstBuffer * buffer)
 
   GST_LOG_OBJECT (demux, "parsing a video tag");
 
-  if G_UNLIKELY (!demux->video_pad && demux->no_more_pads) {
+  if G_UNLIKELY
+    (!demux->video_pad && demux->no_more_pads) {
 #ifndef GST_DISABLE_DEBUG
-    if G_UNLIKELY (!demux->no_video_warned) {
+    if G_UNLIKELY
+      (!demux->no_video_warned) {
       GST_WARNING_OBJECT (demux,
           "Signaled no-more-pads already but had no video pad -- ignoring");
       demux->no_video_warned = TRUE;
-    }
+      }
 #endif
     return GST_FLOW_OK;
-  }
+    }
 
   if (gst_buffer_get_size (buffer) < 12) {
     GST_ERROR_OBJECT (demux, "Too small tag size");
@@ -1448,8 +1499,8 @@ gst_flv_demux_parse_tag_video (GstFlvDemux * demux, GstBuffer * buffer)
 
   /* Check if caps have changed */
   if (G_UNLIKELY (codec_tag != demux->video_codec_tag || demux->got_par)) {
-
     GST_DEBUG_OBJECT (demux, "video settings have changed, changing caps");
+    gst_buffer_replace (&demux->video_codec_data, NULL);
 
     if (!gst_flv_demux_video_negotiate (demux, codec_tag)) {
       ret = GST_FLOW_ERROR;
@@ -1493,6 +1544,12 @@ gst_flv_demux_parse_tag_video (GstFlvDemux * demux, GstBuffer * buffer)
       }
       case 1:
         /* H.264 NALU packet */
+        if (!demux->video_codec_data) {
+          GST_ERROR_OBJECT (demux, "got H.264 video packet before codec data");
+          ret = GST_FLOW_OK;
+          gst_buffer_unref (outbuf);
+          goto beach;
+        }
         GST_LOG_OBJECT (demux, "got a H.264 NALU video packet");
         break;
       default:
@@ -1595,7 +1652,8 @@ gst_flv_demux_parse_tag_video (GstFlvDemux * demux, GstBuffer * buffer)
     goto beach;
   }
 
-  ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret);
+  ret = gst_flow_combiner_update_pad_flow (demux->flowcombiner,
+      demux->video_pad, ret);
 
 beach:
   gst_buffer_unmap (buffer, &map);
@@ -2353,7 +2411,6 @@ gst_flv_demux_seek_to_prev_keyframe (GstFlvDemux * demux)
     gst_object_unref (index);
   }
 
-
 done:
   return ret;
 }
@@ -2706,6 +2763,7 @@ flv_demux_handle_seek_push (GstFlvDemux * demux, GstEvent * event)
       GST_WARNING_OBJECT (demux, "upstream seek failed");
     }
 
+    gst_flow_combiner_reset (demux->flowcombiner);
     /* Tell all the stream we moved to a different position (discont) */
     demux->audio_need_discont = TRUE;
     demux->video_need_discont = TRUE;
@@ -2917,6 +2975,7 @@ gst_flv_demux_handle_seek_pull (GstFlvDemux * demux, GstEvent * event,
               demux->segment.format, demux->segment.position));
     }
 
+    gst_flow_combiner_reset (demux->flowcombiner);
     /* Tell all the stream a new segment is needed */
     demux->audio_need_segment = TRUE;
     demux->video_need_segment = TRUE;
@@ -3107,6 +3166,7 @@ gst_flv_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
           demux->new_seg_event = NULL;
         }
       }
+      gst_flow_combiner_reset (demux->flowcombiner);
       break;
     }
     default:
@@ -3130,9 +3190,12 @@ gst_flv_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
   switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_SEEK:
       /* Try to push upstream first */
+      gst_event_ref (event);
       ret = gst_pad_push_event (demux->sinkpad, event);
-      if (ret)
+      if (ret) {
+        gst_event_unref (event);
         break;
+      }
       if (demux->random_access) {
         ret = gst_flv_demux_handle_seek_pull (demux, event, TRUE);
       } else {
diff --git a/gst/flv/gstindex.c b/gst/flv/gstindex.c
index d56f3cce720ed886a499255823357eefa60fa6ae..26d7fa3d1cdf54d134d08f3a24ca5ceedbbcf87a 100644
--- a/gst/flv/gstindex.c
+++ b/gst/flv/gstindex.c
@@ -70,8 +70,8 @@ enum
 
 enum
 {
-  ARG_0,
-  ARG_RESOLVER
+  PROP_0,
+  PROP_RESOLVER
       /* FILL ME */
 };
 
@@ -178,7 +178,7 @@ gst_index_class_init (GstIndexClass * klass)
   gobject_class->get_property = gst_index_get_property;
   gobject_class->finalize = gst_index_finalize;
 
-  g_object_class_install_property (gobject_class, ARG_RESOLVER,
+  g_object_class_install_property (gobject_class, PROP_RESOLVER,
       g_param_spec_enum ("resolver", "Resolver",
           "Select a predefined object to string mapper",
           GST_TYPE_INDEX_RESOLVER, GST_INDEX_RESOLVER_PATH,
@@ -250,7 +250,7 @@ gst_index_set_property (GObject * object, guint prop_id,
   index = GST_INDEX (object);
 
   switch (prop_id) {
-    case ARG_RESOLVER:
+    case PROP_RESOLVER:
       index->method = (GstIndexResolverMethod) g_value_get_enum (value);
       index->resolver = resolvers[index->method].resolver;
       index->resolver_user_data = resolvers[index->method].user_data;
@@ -270,7 +270,7 @@ gst_index_get_property (GObject * object, guint prop_id,
   index = GST_INDEX (object);
 
   switch (prop_id) {
-    case ARG_RESOLVER:
+    case PROP_RESOLVER:
       g_value_set_enum (value, index->method);
       break;
     default:
diff --git a/gst/flx/Makefile.am b/gst/flx/Makefile.am
index 3aa4eb0b009d9d405ad9a2c3774418b9ca36ccda..aaecaa010410850f2f68d356396b2f25c5038c64 100644
--- a/gst/flx/Makefile.am
+++ b/gst/flx/Makefile.am
@@ -7,18 +7,3 @@ libgstflxdec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstflxdec_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = flx_fmt.h flx_color.h gstflxdec.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstflxdec -:SHARED libgstflxdec \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstflxdec_la_SOURCES) \
-	 	   $(nodist_libgstflxdec_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstflxdec_la_CFLAGS) \
-	 -:LDFLAGS $(libgstflxdec_la_LDFLAGS) \
-	           $(libgstflxdec_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/flx/Makefile.in b/gst/flx/Makefile.in
index 2b40f7d725d0ef831d153ba5a93462e21a004322..5137bfa0b09bb30082f98efdbfa6730da129fbf5 100644
--- a/gst/flx/Makefile.in
+++ b/gst/flx/Makefile.in
@@ -891,21 +891,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstflxdec -:SHARED libgstflxdec \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstflxdec_la_SOURCES) \
-	 	   $(nodist_libgstflxdec_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstflxdec_la_CFLAGS) \
-	 -:LDFLAGS $(libgstflxdec_la_LDFLAGS) \
-	           $(libgstflxdec_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/goom/Makefile.am b/gst/goom/Makefile.am
index 7baa1edea7ff6360f0033d95f5c1919e8eadf922..a0e6424d45c842eb82aa039c608ed91709534574 100644
--- a/gst/goom/Makefile.am
+++ b/gst/goom/Makefile.am
@@ -45,17 +45,3 @@ libgstgoom_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 EXTRA_DIST = $(PPC_FILES) $(MMX_FILES)
 
 .NOTPARALLEL:
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstgoom -:SHARED libgstgoom \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstgoom_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstgoom_la_CFLAGS) \
-	 -:LDFLAGS $(libgstgoom_la_LDFLAGS) \
-	           $(libgstgoom_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/goom/Makefile.in b/gst/goom/Makefile.in
index 3bc56c49be6062fd8773c6b5871e3939319fcffc..80d12758ac79cf3ad7b6561764b31e287508c6ad 100644
--- a/gst/goom/Makefile.in
+++ b/gst/goom/Makefile.in
@@ -1076,20 +1076,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 
 .NOTPARALLEL:
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstgoom -:SHARED libgstgoom \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstgoom_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstgoom_la_CFLAGS) \
-	 -:LDFLAGS $(libgstgoom_la_LDFLAGS) \
-	           $(libgstgoom_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/goom/gstgoom.c b/gst/goom/gstgoom.c
index b22531a8c39a97315cac93a12c9df821ba529d9e..02715f9d7d378ff391e8cbd61bfae869879c8d7e 100644
--- a/gst/goom/gstgoom.c
+++ b/gst/goom/gstgoom.c
@@ -66,7 +66,7 @@ enum
 
 enum
 {
-  ARG_0
+  PROP_0
       /* FILL ME */
 };
 
diff --git a/gst/goom2k1/Makefile.am b/gst/goom2k1/Makefile.am
index b32753f74d236d2cdbdd4bb19def951ecb7b847c..dc92766f69ffd96f59597a3241dfb3400ee819a8 100644
--- a/gst/goom2k1/Makefile.am
+++ b/gst/goom2k1/Makefile.am
@@ -27,17 +27,3 @@ libgstgoom2k1_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstgoom2k1_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 EXTRA_DIST = filters.c
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstgoom2k1 -:SHARED libgstgoom2k1 \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstgoom2k1_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstgoom2k1_la_CFLAGS) \
-	 -:LDFLAGS $(libgstgoom2k1_la_LDFLAGS) \
-	           $(libgstgoom2k1_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/goom2k1/Makefile.in b/gst/goom2k1/Makefile.in
index 9e96360f35e421035bd83803221139858e96b70f..f8d72c41f9fff287b1d9b62a6eb5d49cc73ddf10 100644
--- a/gst/goom2k1/Makefile.in
+++ b/gst/goom2k1/Makefile.in
@@ -934,20 +934,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstgoom2k1 -:SHARED libgstgoom2k1 \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstgoom2k1_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstgoom2k1_la_CFLAGS) \
-	 -:LDFLAGS $(libgstgoom2k1_la_LDFLAGS) \
-	           $(libgstgoom2k1_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/goom2k1/gstgoom.c b/gst/goom2k1/gstgoom.c
index 447352cba4213b52caf17fae8e598122eb597b3d..7f37b32f3395a88ceae33d8b8c6efad6dee4e29a 100644
--- a/gst/goom2k1/gstgoom.c
+++ b/gst/goom2k1/gstgoom.c
@@ -62,7 +62,7 @@ enum
 
 enum
 {
-  ARG_0
+  PROP_0
       /* FILL ME */
 };
 
diff --git a/gst/icydemux/Makefile.am b/gst/icydemux/Makefile.am
index 98af4ed27bd0f2832d6be6e51a4c411ea93427a7..c2ed649c3a1a46a2e32568f0c19a10fbc64d093a 100644
--- a/gst/icydemux/Makefile.am
+++ b/gst/icydemux/Makefile.am
@@ -7,17 +7,3 @@ libgsticydemux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgsticydemux_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gsticydemux.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsticydemux -:SHARED libgsticydemux \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsticydemux_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsticydemux_la_CFLAGS) \
-	 -:LDFLAGS $(libgsticydemux_la_LDFLAGS) \
-	           $(libgsticydemux_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/icydemux/Makefile.in b/gst/icydemux/Makefile.in
index d851cbd4d894a6dcc20ba68270428b71ec8d6219..9cf75018ad7193a6804027c8f09ce0e186830e48 100644
--- a/gst/icydemux/Makefile.in
+++ b/gst/icydemux/Makefile.in
@@ -882,20 +882,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsticydemux -:SHARED libgsticydemux \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsticydemux_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsticydemux_la_CFLAGS) \
-	 -:LDFLAGS $(libgsticydemux_la_LDFLAGS) \
-	           $(libgsticydemux_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/icydemux/gsticydemux.c b/gst/icydemux/gsticydemux.c
index cdcb5edeb781c637f899b6db56c16d1094a2822a..dade21bd687666b79d220381e932b1c7bd527f36 100644
--- a/gst/icydemux/gsticydemux.c
+++ b/gst/icydemux/gsticydemux.c
@@ -551,6 +551,7 @@ gst_icydemux_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
 
   if (icydemux->meta_interval == 0) {
     ret = gst_icydemux_typefind_or_forward (icydemux, buf);
+    buf = NULL;
     goto done;
   }
 
diff --git a/gst/id3demux/Makefile.am b/gst/id3demux/Makefile.am
index 0c67df471f2a5e554ab27082a9339ed3165ca478..e4794e5dcab0b46dcf6d5d97287d70c6be7dfdc3 100644
--- a/gst/id3demux/Makefile.am
+++ b/gst/id3demux/Makefile.am
@@ -8,17 +8,3 @@ libgstid3demux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstid3demux_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstid3demux.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstid3demux -:SHARED libgstid3demux \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstid3demux_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(libgstid3demux_la_CFLAGS) \
-	 -:LDFLAGS $(libgstid3demux_la_LDFLAGS) \
-	           $(libgstid3demux_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/id3demux/Makefile.in b/gst/id3demux/Makefile.in
index 1452d903fc1c32be317b2c866bdcd0e4419c5ebb..63abc193806c8274f12db2f6b08dc8f72935f3ae 100644
--- a/gst/id3demux/Makefile.in
+++ b/gst/id3demux/Makefile.in
@@ -884,20 +884,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstid3demux -:SHARED libgstid3demux \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstid3demux_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(libgstid3demux_la_CFLAGS) \
-	 -:LDFLAGS $(libgstid3demux_la_LDFLAGS) \
-	           $(libgstid3demux_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/id3demux/gstid3demux.c b/gst/id3demux/gstid3demux.c
index a55832a522467cb8817b90b69a643c106ca9b808..c67a6ff0bc640c3aab37882615f8067ff248ae8f 100644
--- a/gst/id3demux/gstid3demux.c
+++ b/gst/id3demux/gstid3demux.c
@@ -58,8 +58,8 @@
 
 enum
 {
-  ARG_0,
-  ARG_PREFER_V1
+  PROP_0,
+  PROP_PREFER_V1
 };
 
 #define DEFAULT_PREFER_V1  FALSE
@@ -102,7 +102,7 @@ gst_id3demux_class_init (GstID3DemuxClass * klass)
   gobject_class->set_property = gst_id3demux_set_property;
   gobject_class->get_property = gst_id3demux_get_property;
 
-  g_object_class_install_property (gobject_class, ARG_PREFER_V1,
+  g_object_class_install_property (gobject_class, PROP_PREFER_V1,
       g_param_spec_boolean ("prefer-v1", "Prefer version 1 tag",
           "Prefer tags from ID3v1 tag at end of file when both ID3v1 "
           "and ID3v2 tags are present", DEFAULT_PREFER_V1,
@@ -239,7 +239,7 @@ gst_id3demux_set_property (GObject * object, guint prop_id,
   id3demux = GST_ID3DEMUX (object);
 
   switch (prop_id) {
-    case ARG_PREFER_V1:{
+    case PROP_PREFER_V1:{
       GST_OBJECT_LOCK (id3demux);
       id3demux->prefer_v1 = g_value_get_boolean (value);
       GST_OBJECT_UNLOCK (id3demux);
@@ -260,7 +260,7 @@ gst_id3demux_get_property (GObject * object, guint prop_id,
   id3demux = GST_ID3DEMUX (object);
 
   switch (prop_id) {
-    case ARG_PREFER_V1:
+    case PROP_PREFER_V1:
       GST_OBJECT_LOCK (id3demux);
       g_value_set_boolean (value, id3demux->prefer_v1);
       GST_OBJECT_UNLOCK (id3demux);
diff --git a/gst/imagefreeze/Makefile.am b/gst/imagefreeze/Makefile.am
index e31288eaa429864a3b050687d971790935d8e2ac..72615a5992a38938e63b5df85ae8aafa1609deea 100644
--- a/gst/imagefreeze/Makefile.am
+++ b/gst/imagefreeze/Makefile.am
@@ -8,17 +8,3 @@ libgstimagefreeze_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstimagefreeze_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstimagefreeze.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstimagefreeze -:SHARED libgstimagefreeze \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstimagefreeze_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstimagefreeze_la_CFLAGS) \
-	 -:LDFLAGS $(libgstimagefreeze_la_LDFLAGS) \
-	           $(libgstimagefreeze_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/imagefreeze/Makefile.in b/gst/imagefreeze/Makefile.in
index d80c7caf584d92027ecf66a4aa1c38e51a018e2a..f4e92ba7026f665032401f28c075c120668d9c47 100644
--- a/gst/imagefreeze/Makefile.in
+++ b/gst/imagefreeze/Makefile.in
@@ -882,20 +882,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstimagefreeze -:SHARED libgstimagefreeze \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstimagefreeze_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstimagefreeze_la_CFLAGS) \
-	 -:LDFLAGS $(libgstimagefreeze_la_LDFLAGS) \
-	           $(libgstimagefreeze_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/interleave/Makefile.am b/gst/interleave/Makefile.am
index f27de70660331fff6e04b1da2c4728ff019b0a3e..dddaefa9b204e24c7fc9ad2c2705acbe495b1644 100644
--- a/gst/interleave/Makefile.am
+++ b/gst/interleave/Makefile.am
@@ -8,17 +8,3 @@ libgstinterleave_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstinterleave_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = plugin.h interleave.h deinterleave.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstinterleave -:SHARED libgstinterleave \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstinterleave_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstinterleave_la_CFLAGS) \
-	 -:LDFLAGS $(libgstinterleave_la_LDFLAGS) \
-	           $(libgstinterleave_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/interleave/Makefile.in b/gst/interleave/Makefile.in
index b821aefb154c72748b72be3cfc5a47f8decb20ff..fcb8719d519da4c13cd90f89496da15bffef983c 100644
--- a/gst/interleave/Makefile.in
+++ b/gst/interleave/Makefile.in
@@ -900,20 +900,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstinterleave -:SHARED libgstinterleave \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstinterleave_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstinterleave_la_CFLAGS) \
-	 -:LDFLAGS $(libgstinterleave_la_LDFLAGS) \
-	           $(libgstinterleave_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/isomp4/Makefile.am b/gst/isomp4/Makefile.am
index 30ef999da7f94abaa265ceb9ae13ec0759956f91..8cfdd15a3ccc705cc9c72bb1997c0043de310f74 100644
--- a/gst/isomp4/Makefile.am
+++ b/gst/isomp4/Makefile.am
@@ -39,17 +39,3 @@ noinst_HEADERS = \
 EXTRA_DIST = \
 	gstqtmux-doc.c \
 	gstqtmux-doc.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstisomp4 -:SHARED libgstisomp4 \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstisomp4_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(libgstisomp4_la_CFLAGS) \
-	 -:LDFLAGS $(libgstisomp4_la_LDFLAGS) \
-	           $(libgstisomp4_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/isomp4/Makefile.in b/gst/isomp4/Makefile.in
index 1ae0dd7cb68e6b6742b6d0aa60615f384fd4c872..5dbfcdffdb37b8bc85f4c30214de51bb653279a2 100644
--- a/gst/isomp4/Makefile.in
+++ b/gst/isomp4/Makefile.in
@@ -1029,20 +1029,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstisomp4 -:SHARED libgstisomp4 \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstisomp4_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(libgstisomp4_la_CFLAGS) \
-	 -:LDFLAGS $(libgstisomp4_la_LDFLAGS) \
-	           $(libgstisomp4_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c
index e61ec6ce04155a0cc86ac8319adcf95adc84b525..14e699bd4fc6d3a2bac466368e9cf013f66ec001 100644
--- a/gst/isomp4/gstqtmux.c
+++ b/gst/isomp4/gstqtmux.c
@@ -127,6 +127,58 @@
 GST_DEBUG_CATEGORY_STATIC (gst_qt_mux_debug);
 #define GST_CAT_DEFAULT gst_qt_mux_debug
 
+/* Hacker notes.
+ *
+ * The basic building blocks of MP4 files are:
+ *  - an 'ftyp' box at the very start
+ *  - an 'mdat' box which contains the raw audio/video/subtitle data;
+ *    this is just a bunch of bytes, completely unframed and possibly
+ *    unordered with no additional meta-information
+ *  - a 'moov' box that contains information about the different streams
+ *    and what they contain, as well as sample tables for each stream
+ *    that tell the demuxer where in the mdat box each buffer/sample is
+ *    and what its duration/timestamp etc. is, and whether it's a
+ *    keyframe etc.
+ * Additionally, fragmented MP4 works by writing chunks of data in
+ * pairs of 'moof' and 'mdat' boxes:
+ *  - 'moof' boxes, header preceding each mdat fragment describing the
+ *    contents, like a moov but only for that fragment.
+ *  - a 'mfra' box for Fragmented MP4, which is written at the end and
+ *    contains a summary of all fragments and seek tables.
+ *
+ * Currently mp4mux can work in 3 different modes / generate 3 types
+ * of output files/streams:
+ *
+ * - Normal mp4: mp4mux will write a little ftyp identifier at the
+ *   beginning, then start an mdat box into which it will write all the
+ *   sample data. At EOS it will then write the moov header with track
+ *   headers and sample tables at the end of the file, and rewrite the
+ *   start of the file to fix up the mdat box size at the beginning.
+ *   It has to wait for EOS to write the moov (which includes the
+ *   sample tables) because it doesn't know how much space those
+ *   tables will be. The output downstream must be seekable to rewrite
+ *   the mdat box at EOS.
+ *
+ * - Fragmented mp4: moov header with track headers at start
+ *   but no sample table), followed by N fragments, each containing
+ *   track headers with sample tables followed by some data. Downstream
+ *   does not need to be seekable if the 'streamable' flag is TRUE,
+ *   as the final mfra and total duration will be omitted.
+ *
+ * - Fast-start mp4: the goal here is to create a file where the moov
+ *   headers are at the beginning; what mp4mux will do is write all
+ *   sample data into a temp file and build moov header plus sample
+ *   tables in memory and then when EOS comes, it will push out the
+ *   moov header plus sample tables at the beginning, followed by the
+ *   mdat sample data at the end which is read in from the temp file
+ *   Files created in this mode are better for streaming over the
+ *   network, since the client doesn't have to seek to the end of the
+ *   file to get the headers, but it requires copying all sample data
+ *   out of the temp file at EOS, which can be expensive. Downstream does
+ *   not need to be seekable, because of the use of the temp file.
+ *
+ */
+
 #ifndef GST_REMOVE_DEPRECATED
 enum
 {
@@ -1691,6 +1743,75 @@ serialize_error:
   }
 }
 
+static gboolean
+gst_qt_mux_downstream_is_seekable (GstQTMux * qtmux)
+{
+  gboolean seekable = FALSE;
+  GstQuery *query = gst_query_new_seeking (GST_FORMAT_BYTES);
+
+  if (gst_pad_peer_query (qtmux->srcpad, query)) {
+    gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL);
+    GST_INFO_OBJECT (qtmux, "downstream is %sseekable", seekable ? "" : "not ");
+  } else {
+    /* have to assume seeking is not supported if query not handled downstream */
+    GST_WARNING_OBJECT (qtmux, "downstream did not handle seeking query");
+    seekable = FALSE;
+  }
+  gst_query_unref (query);
+
+  return seekable;
+}
+
+static void
+gst_qt_mux_prepare_moov_recovery (GstQTMux * qtmux)
+{
+  GSList *walk;
+  gboolean fail = FALSE;
+  AtomFTYP *ftyp = NULL;
+  GstBuffer *prefix = NULL;
+
+  GST_DEBUG_OBJECT (qtmux, "Openning moov recovery file: %s",
+      qtmux->moov_recov_file_path);
+
+  qtmux->moov_recov_file = g_fopen (qtmux->moov_recov_file_path, "wb+");
+  if (qtmux->moov_recov_file == NULL) {
+    GST_WARNING_OBJECT (qtmux, "Failed to open moov recovery file in %s",
+        qtmux->moov_recov_file_path);
+    return;
+  }
+
+  gst_qt_mux_prepare_ftyp (qtmux, &ftyp, &prefix);
+
+  if (!atoms_recov_write_headers (qtmux->moov_recov_file, ftyp, prefix,
+          qtmux->moov, qtmux->timescale, g_slist_length (qtmux->sinkpads))) {
+    GST_WARNING_OBJECT (qtmux, "Failed to write moov recovery file " "headers");
+    goto fail;
+  }
+
+  atom_ftyp_free (ftyp);
+  if (prefix)
+    gst_buffer_unref (prefix);
+
+  for (walk = qtmux->sinkpads; walk && !fail; walk = g_slist_next (walk)) {
+    GstCollectData *cdata = (GstCollectData *) walk->data;
+    GstQTPad *qpad = (GstQTPad *) cdata;
+    /* write info for each stream */
+    fail = atoms_recov_write_trak_info (qtmux->moov_recov_file, qpad->trak);
+    if (fail) {
+      GST_WARNING_OBJECT (qtmux, "Failed to write trak info to recovery "
+          "file");
+      break;
+    }
+  }
+
+fail:
+  /* cleanup */
+  fclose (qtmux->moov_recov_file);
+  qtmux->moov_recov_file = NULL;
+  GST_WARNING_OBJECT (qtmux, "An error was detected while writing to "
+      "recover file, moov recovery won't work");
+}
+
 static GstFlowReturn
 gst_qt_mux_start_file (GstQTMux * qtmux)
 {
@@ -1713,39 +1834,49 @@ gst_qt_mux_start_file (GstQTMux * qtmux)
   gst_pad_set_caps (qtmux->srcpad, caps);
   gst_caps_unref (caps);
 
-  /* if not streaming, check if downstream is seekable */
-  if (!qtmux->streamable) {
-    gboolean seekable;
-    GstQuery *query;
+  /* Default is 'normal' mode */
+  qtmux->mux_mode = GST_QT_MUX_MODE_MOOV_AT_END;
 
-    query = gst_query_new_seeking (GST_FORMAT_BYTES);
-    if (gst_pad_peer_query (qtmux->srcpad, query)) {
-      gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL);
-      GST_INFO_OBJECT (qtmux, "downstream is %sseekable",
-          seekable ? "" : "not ");
-    } else {
-      /* have to assume seeking is supported if query not handled downstream */
-      GST_WARNING_OBJECT (qtmux, "downstream did not handle seeking query");
-      seekable = FALSE;
-    }
-    gst_query_unref (query);
-    if (!seekable) {
-      if (qtmux_klass->format != GST_QT_MUX_FORMAT_ISML) {
-        if (!qtmux->fast_start) {
-          GST_ELEMENT_WARNING (qtmux, STREAM, FAILED,
-              ("Downstream is not seekable and headers can't be rewritten"),
-              (NULL));
-          /* FIXME: Is there something better we can do? */
-          qtmux->streamable = TRUE;
-        }
-      } else {
+  /* Require a sensible fragment duration when muxing
+   * using the ISML muxer */
+  if (qtmux_klass->format == GST_QT_MUX_FORMAT_ISML &&
+      qtmux->fragment_duration == 0)
+    goto invalid_isml;
+
+  if (qtmux->fragment_duration > 0) {
+    if (qtmux->streamable)
+      qtmux->mux_mode = GST_QT_MUX_MODE_FRAGMENTED_STREAMABLE;
+    else
+      qtmux->mux_mode = GST_QT_MUX_MODE_FRAGMENTED;
+  } else if (qtmux->fast_start) {
+    qtmux->mux_mode = GST_QT_MUX_MODE_FAST_START;
+  }
+
+  switch (qtmux->mux_mode) {
+    case GST_QT_MUX_MODE_MOOV_AT_END:
+      /* We have to be able to seek to rewrite the mdat header, or any
+       * moov atom we write will not be visible in the file, because an
+       * MDAT with 0 as the size covers the rest of the file. A file
+       * with no moov is not playable, so error out now. */
+      if (!gst_qt_mux_downstream_is_seekable (qtmux)) {
+        GST_ELEMENT_ERROR (qtmux, STREAM, MUX,
+            ("Downstream is not seekable - will not be able to create a playable file"),
+            (NULL));
+        return GST_FLOW_ERROR;
+      }
+      break;
+    case GST_QT_MUX_MODE_FAST_START:
+    case GST_QT_MUX_MODE_FRAGMENTED_STREAMABLE:
+      break;                    /* Don't need seekability, ignore */
+    case GST_QT_MUX_MODE_FRAGMENTED:
+      if (!gst_qt_mux_downstream_is_seekable (qtmux)) {
         GST_WARNING_OBJECT (qtmux, "downstream is not seekable, but "
             "streamable=false. Will ignore that and create streamable output "
             "instead");
         qtmux->streamable = TRUE;
         g_object_notify (G_OBJECT (qtmux), "streamable");
       }
-    }
+      break;
   }
 
   /* let downstream know we think in BYTES and expect to do seeking later on */
@@ -1755,81 +1886,44 @@ gst_qt_mux_start_file (GstQTMux * qtmux)
   /* initialize our moov recovery file */
   GST_OBJECT_LOCK (qtmux);
   if (qtmux->moov_recov_file_path) {
-    GST_DEBUG_OBJECT (qtmux, "Openning moov recovery file: %s",
-        qtmux->moov_recov_file_path);
-    qtmux->moov_recov_file = g_fopen (qtmux->moov_recov_file_path, "wb+");
-    if (qtmux->moov_recov_file == NULL) {
-      GST_WARNING_OBJECT (qtmux, "Failed to open moov recovery file in %s",
-          qtmux->moov_recov_file_path);
-    } else {
-      GSList *walk;
-      gboolean fail = FALSE;
-      AtomFTYP *ftyp = NULL;
-      GstBuffer *prefix = NULL;
-
-      gst_qt_mux_prepare_ftyp (qtmux, &ftyp, &prefix);
-
-      if (!atoms_recov_write_headers (qtmux->moov_recov_file, ftyp, prefix,
-              qtmux->moov, qtmux->timescale,
-              g_slist_length (qtmux->sinkpads))) {
-        GST_WARNING_OBJECT (qtmux, "Failed to write moov recovery file "
-            "headers");
-        fail = TRUE;
-      }
-
-      atom_ftyp_free (ftyp);
-      if (prefix)
-        gst_buffer_unref (prefix);
-
-      for (walk = qtmux->sinkpads; walk && !fail; walk = g_slist_next (walk)) {
-        GstCollectData *cdata = (GstCollectData *) walk->data;
-        GstQTPad *qpad = (GstQTPad *) cdata;
-        /* write info for each stream */
-        fail = atoms_recov_write_trak_info (qtmux->moov_recov_file, qpad->trak);
-        if (fail) {
-          GST_WARNING_OBJECT (qtmux, "Failed to write trak info to recovery "
-              "file");
-        }
-      }
-      if (fail) {
-        /* cleanup */
-        fclose (qtmux->moov_recov_file);
-        qtmux->moov_recov_file = NULL;
-        GST_WARNING_OBJECT (qtmux, "An error was detected while writing to "
-            "recover file, moov recovery won't work");
-      }
-    }
+    gst_qt_mux_prepare_moov_recovery (qtmux);
   }
   GST_OBJECT_UNLOCK (qtmux);
 
-  /* 
+  /*
    * send mdat header if already needed, and mark position for later update.
    * We don't send ftyp now if we are on fast start mode, because we can
    * better fine tune using the information we gather to create the whole moov
    * atom.
    */
-  if (qtmux->fast_start) {
-    GST_OBJECT_LOCK (qtmux);
-    qtmux->fast_start_file = g_fopen (qtmux->fast_start_file_path, "wb+");
-    if (!qtmux->fast_start_file)
-      goto open_failed;
-    GST_OBJECT_UNLOCK (qtmux);
-
-    /* send a dummy buffer for preroll */
-    ret = gst_qt_mux_send_buffer (qtmux, gst_buffer_new (), NULL, FALSE);
-    if (ret != GST_FLOW_OK)
-      goto exit;
-
-  } else {
-    ret = gst_qt_mux_prepare_and_send_ftyp (qtmux);
-    if (ret != GST_FLOW_OK) {
-      goto exit;
-    }
-
-    /* well, it's moov pos if fragmented ... */
-    qtmux->mdat_pos = qtmux->header_size;
+  switch (qtmux->mux_mode) {
+    case GST_QT_MUX_MODE_MOOV_AT_END:
+      ret = gst_qt_mux_prepare_and_send_ftyp (qtmux);
+      if (ret != GST_FLOW_OK)
+        break;
 
-    if (qtmux->fragment_duration) {
+      /* store the mdat position for rewriting later ... */
+      qtmux->mdat_pos = qtmux->header_size;
+      /* extended atom in case we go over 4GB while writing and need
+       * the full 64-bit atom */
+      ret = gst_qt_mux_send_mdat_header (qtmux, &qtmux->header_size, 0, TRUE);
+      break;
+    case GST_QT_MUX_MODE_FAST_START:
+      GST_OBJECT_LOCK (qtmux);
+      qtmux->fast_start_file = g_fopen (qtmux->fast_start_file_path, "wb+");
+      if (!qtmux->fast_start_file)
+        goto open_failed;
+      GST_OBJECT_UNLOCK (qtmux);
+      /* send a dummy buffer for preroll */
+      ret = gst_qt_mux_send_buffer (qtmux, gst_buffer_new (), NULL, FALSE);
+      break;
+    case GST_QT_MUX_MODE_FRAGMENTED:
+    case GST_QT_MUX_MODE_FRAGMENTED_STREAMABLE:
+      ret = gst_qt_mux_prepare_and_send_ftyp (qtmux);
+      if (ret != GST_FLOW_OK)
+        break;
+      /* well, it's moov pos if fragmented ... */
+      qtmux->mdat_pos = qtmux->header_size;
       GST_DEBUG_OBJECT (qtmux, "fragment duration %d ms, writing headers",
           qtmux->fragment_duration);
       /* also used as snapshot marker to indicate fragmented file */
@@ -1844,25 +1938,27 @@ gst_qt_mux_start_file (GstQTMux * qtmux)
       ret =
           gst_qt_mux_send_extra_atoms (qtmux, TRUE, &qtmux->header_size, FALSE);
       if (ret != GST_FLOW_OK)
-        return ret;
-      /* prepare index */
-      if (!qtmux->streamable)
+        break;
+      /* prepare index if not streamable */
+      if (qtmux->mux_mode == GST_QT_MUX_MODE_FRAGMENTED)
         qtmux->mfra = atom_mfra_new (qtmux->context);
-    } else {
-      /* extended to ensure some spare space */
-      ret = gst_qt_mux_send_mdat_header (qtmux, &qtmux->header_size, 0, TRUE);
-    }
+      break;
   }
 
-exit:
   return ret;
-
   /* ERRORS */
+invalid_isml:
+  {
+    GST_ELEMENT_ERROR (qtmux, STREAM, MUX,
+        ("Cannot create an ISML file with 0 fragment duration"), (NULL));
+    return GST_FLOW_ERROR;
+  }
+
 open_failed:
   {
     GST_ELEMENT_ERROR (qtmux, RESOURCE, OPEN_READ_WRITE,
-        (("Could not open temporary file \"%s\""), qtmux->fast_start_file_path),
-        GST_ERROR_SYSTEM);
+        (("Could not open temporary file \"%s\""),
+            qtmux->fast_start_file_path), GST_ERROR_SYSTEM);
     GST_OBJECT_UNLOCK (qtmux);
     return GST_FLOW_ERROR;
   }
@@ -1959,10 +2055,16 @@ gst_qt_mux_stop_file (GstQTMux * qtmux)
     }
   }
 
-  if (qtmux->fragment_sequence) {
-    GstSegment segment;
-
-    if (qtmux->mfra) {
+  switch (qtmux->mux_mode) {
+    case GST_QT_MUX_MODE_FRAGMENTED_STREAMABLE:
+    {
+      /* Streamable mode; no need to write duration or MFRA */
+      GST_DEBUG_OBJECT (qtmux, "streamable file; nothing to stop");
+      return GST_FLOW_OK;
+    }
+    case GST_QT_MUX_MODE_FRAGMENTED:
+    {
+      GstSegment segment;
       guint8 *data = NULL;
       GstBuffer *buf;
 
@@ -1974,31 +2076,29 @@ gst_qt_mux_stop_file (GstQTMux * qtmux)
       ret = gst_qt_mux_send_buffer (qtmux, buf, NULL, FALSE);
       if (ret != GST_FLOW_OK)
         return ret;
-    } else {
-      /* must have been streamable; no need to write duration */
-      GST_DEBUG_OBJECT (qtmux, "streamable file; nothing to stop");
-      return GST_FLOW_OK;
-    }
 
-    timescale = qtmux->timescale;
-    /* only mvex duration is updated,
-     * mvhd should be consistent with empty moov
-     * (but TODO maybe some clients do not handle that well ?) */
-    qtmux->moov->mvex.mehd.fragment_duration =
-        gst_util_uint64_scale (first_ts, timescale, GST_SECOND);
-    GST_DEBUG_OBJECT (qtmux, "rewriting moov with mvex duration %"
-        GST_TIME_FORMAT, GST_TIME_ARGS (first_ts));
-    /* seek and rewrite the header */
-    gst_segment_init (&segment, GST_FORMAT_BYTES);
-    segment.start = qtmux->mdat_pos;
-    gst_pad_push_event (qtmux->srcpad, gst_event_new_segment (&segment));
-    /* no need to seek back */
-    return gst_qt_mux_send_moov (qtmux, NULL, FALSE);
+      timescale = qtmux->timescale;
+      /* only mvex duration is updated,
+       * mvhd should be consistent with empty moov
+       * (but TODO maybe some clients do not handle that well ?) */
+      qtmux->moov->mvex.mehd.fragment_duration =
+          gst_util_uint64_scale (first_ts, timescale, GST_SECOND);
+      GST_DEBUG_OBJECT (qtmux, "rewriting moov with mvex duration %"
+          GST_TIME_FORMAT, GST_TIME_ARGS (first_ts));
+      /* seek and rewrite the header */
+      gst_segment_init (&segment, GST_FORMAT_BYTES);
+      segment.start = qtmux->mdat_pos;
+      gst_pad_push_event (qtmux->srcpad, gst_event_new_segment (&segment));
+      /* no need to seek back */
+      return gst_qt_mux_send_moov (qtmux, NULL, FALSE);
+    }
+    default:
+      break;
   }
 
+  /* Moov-at-end or fast-start mode from here down */
   gst_qt_mux_configure_moov (qtmux, &timescale);
-
-  /* check for late streams */
+  /* check for late streams. First, find the earliest start time */
   first_ts = GST_CLOCK_TIME_NONE;
   for (walk = qtmux->collect->data; walk; walk = g_slist_next (walk)) {
     GstCollectData *cdata = (GstCollectData *) walk->data;
@@ -2046,12 +2146,12 @@ gst_qt_mux_stop_file (GstQTMux * qtmux)
 
   /* tags into file metadata */
   gst_qt_mux_setup_metadata (qtmux);
-
   large_file = (qtmux->mdat_size > MDAT_LARGE_FILE_LIMIT);
+
   /* if faststart, update the offset of the atoms in the movie with the offset
    * that the movie headers before mdat will cause.
    * Also, send the ftyp */
-  if (qtmux->fast_start_file) {
+  if (qtmux->mux_mode == GST_QT_MUX_MODE_FAST_START) {
     GstFlowReturn flow_ret;
     offset = size = 0;
 
@@ -2073,9 +2173,12 @@ gst_qt_mux_stop_file (GstQTMux * qtmux)
   } else {
     offset = qtmux->header_size;
   }
+
+  /* Now that we know the size of moov + extra atoms, we can adjust
+   * the chunk offsets stored into the moov */
   atom_moov_chunks_add_offset (qtmux->moov, offset);
 
-  /* moov */
+  /* write out moov and extra atoms */
   /* note: as of this point, we no longer care about tracking written data size,
    * since there is no more use for it anyway */
   ret = gst_qt_mux_send_moov (qtmux, NULL, FALSE);
@@ -2087,23 +2190,32 @@ gst_qt_mux_stop_file (GstQTMux * qtmux)
   if (ret != GST_FLOW_OK)
     return ret;
 
-  /* if needed, send mdat atom and move buffered data into it */
-  if (qtmux->fast_start_file) {
-    /* mdat_size = accumulated (buffered data) */
-    ret = gst_qt_mux_send_mdat_header (qtmux, NULL, qtmux->mdat_size,
-        large_file);
-    if (ret != GST_FLOW_OK)
-      return ret;
-    ret = gst_qt_mux_send_buffered_data (qtmux, NULL);
-    if (ret != GST_FLOW_OK)
-      return ret;
-  } else if (!qtmux->streamable) {
-    /* mdat needs update iff not using faststart */
-    GST_DEBUG_OBJECT (qtmux, "updating mdat size");
-    ret = gst_qt_mux_update_mdat_size (qtmux, qtmux->mdat_pos,
-        qtmux->mdat_size, NULL);
-    /* note; no seeking back to the end of file is done,
-     * since we no longer write anything anyway */
+  switch (qtmux->mux_mode) {
+    case GST_QT_MUX_MODE_MOOV_AT_END:
+    {
+      /* mdat needs update iff not using faststart */
+      GST_DEBUG_OBJECT (qtmux, "updating mdat size");
+      ret = gst_qt_mux_update_mdat_size (qtmux, qtmux->mdat_pos,
+          qtmux->mdat_size, NULL);
+      /* note; no seeking back to the end of file is done,
+       * since we no longer write anything anyway */
+      break;
+    }
+    case GST_QT_MUX_MODE_FAST_START:
+    {
+      /* send mdat atom and move buffered data into it */
+      /* mdat_size = accumulated (buffered data) */
+      ret = gst_qt_mux_send_mdat_header (qtmux, NULL, qtmux->mdat_size,
+          large_file);
+      if (ret != GST_FLOW_OK)
+        return ret;
+      ret = gst_qt_mux_send_buffered_data (qtmux, NULL);
+      if (ret != GST_FLOW_OK)
+        return ret;
+      break;
+    }
+    default:
+      g_assert_not_reached ();
   }
 
   return ret;
@@ -2218,21 +2330,6 @@ init:
   return ret;
 }
 
-static void
-check_and_subtract_ts (GstQTMux * qtmux, GstClockTime * ts_a, GstClockTime ts_b)
-{
-  if (G_LIKELY (GST_CLOCK_TIME_IS_VALID (*ts_a))) {
-    if (G_LIKELY (*ts_a >= ts_b)) {
-      *ts_a -= ts_b;
-    } else {
-      *ts_a = 0;
-      GST_WARNING_OBJECT (qtmux, "Subtraction would result in negative value, "
-          "using 0 as result");
-    }
-  }
-}
-
-
 static GstFlowReturn
 gst_qt_mux_register_and_push_sample (GstQTMux * qtmux, GstQTPad * pad,
     GstBuffer * buffer, gboolean is_last_buffer, guint nsamples,
@@ -2253,15 +2350,21 @@ gst_qt_mux_register_and_push_sample (GstQTMux * qtmux, GstQTPad * pad,
     }
   }
 
-  if (qtmux->fragment_sequence) {
-    /* ensure that always sync samples are marked as such */
-    ret = gst_qt_mux_pad_fragment_add_buffer (qtmux, pad, buffer,
-        is_last_buffer, nsamples, last_dts, (gint32) scaled_duration,
-        sample_size, !pad->sync || sync, pts_offset);
-  } else {
-    atom_trak_add_samples (pad->trak, nsamples, (gint32) scaled_duration,
-        sample_size, chunk_offset, sync, pts_offset);
-    ret = gst_qt_mux_send_buffer (qtmux, buffer, &qtmux->mdat_size, TRUE);
+  switch (qtmux->mux_mode) {
+    case GST_QT_MUX_MODE_MOOV_AT_END:
+    case GST_QT_MUX_MODE_FAST_START:
+
+      atom_trak_add_samples (pad->trak, nsamples, (gint32) scaled_duration,
+          sample_size, chunk_offset, sync, pts_offset);
+      ret = gst_qt_mux_send_buffer (qtmux, buffer, &qtmux->mdat_size, TRUE);
+      break;
+    case GST_QT_MUX_MODE_FRAGMENTED:
+    case GST_QT_MUX_MODE_FRAGMENTED_STREAMABLE:
+      /* ensure that always sync samples are marked as such */
+      ret = gst_qt_mux_pad_fragment_add_buffer (qtmux, pad, buffer,
+          is_last_buffer, nsamples, last_dts, (gint32) scaled_duration,
+          sample_size, !pad->sync || sync, pts_offset);
+      break;
   }
 
   return ret;
@@ -2279,7 +2382,7 @@ gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf)
   guint64 chunk_offset;
   gint64 last_dts, scaled_duration;
   gint64 pts_offset = 0;
-  gboolean sync = FALSE, do_pts = FALSE;
+  gboolean sync = FALSE;
   GstFlowReturn ret = GST_FLOW_OK;
 
   if (!pad->fourcc)
@@ -2290,13 +2393,6 @@ gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf)
     buf = pad->prepare_buf_func (pad, buf, qtmux);
   }
 
-  if (G_LIKELY (buf != NULL && GST_CLOCK_TIME_IS_VALID (pad->first_ts) &&
-          pad->first_ts != 0)) {
-    buf = gst_buffer_make_writable (buf);
-    check_and_subtract_ts (qtmux, &GST_BUFFER_DTS (buf), pad->first_ts);
-    check_and_subtract_ts (qtmux, &GST_BUFFER_PTS (buf), pad->first_ts);
-  }
-
   last_buf = pad->last_buf;
 
   /* DTS delta is used to calculate sample duration.
@@ -2311,11 +2407,7 @@ gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf)
         GST_BUFFER_DURATION (last_buf) : 0;
 
     buf = gst_buffer_make_writable (buf);
-    GST_BUFFER_DTS (buf) =
-        gst_segment_to_running_time (&pad->collect.segment, GST_FORMAT_TIME,
-        pad->collect.segment.start);
-    if (GST_CLOCK_TIME_IS_VALID (pad->first_ts))
-      check_and_subtract_ts (qtmux, &GST_BUFFER_DTS (buf), pad->first_ts);
+    GST_BUFFER_DTS (buf) = 0;   /* running-time 0 */
 
     if (last_buf
         && (GST_BUFFER_DTS (last_buf) + last_buf_duration) >
@@ -2353,7 +2445,6 @@ gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf)
   /* if this is the first buffer, store the timestamp */
   if (G_UNLIKELY (pad->first_ts == GST_CLOCK_TIME_NONE) && last_buf) {
     if (GST_BUFFER_DTS_IS_VALID (last_buf)) {
-      /* first pad always has DTS. If it was not provided by upstream it was set to segment start */
       pad->first_ts = GST_BUFFER_DTS (last_buf);
     } else if (GST_BUFFER_PTS_IS_VALID (last_buf)) {
       pad->first_ts = GST_BUFFER_PTS (last_buf);
@@ -2361,23 +2452,14 @@ gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf)
 
     if (GST_CLOCK_TIME_IS_VALID (pad->first_ts)) {
       GST_DEBUG ("setting first_ts to %" G_GUINT64_FORMAT, pad->first_ts);
-      last_buf = gst_buffer_make_writable (last_buf);
-      check_and_subtract_ts (qtmux, &GST_BUFFER_DTS (last_buf), pad->first_ts);
-      check_and_subtract_ts (qtmux, &GST_BUFFER_PTS (last_buf), pad->first_ts);
-      if (buf) {
-        buf = gst_buffer_make_writable (buf);
-        check_and_subtract_ts (qtmux, &GST_BUFFER_DTS (buf), pad->first_ts);
-        check_and_subtract_ts (qtmux, &GST_BUFFER_PTS (buf), pad->first_ts);
-      }
     } else {
-      GST_ERROR_OBJECT (qtmux, "First buffer for pad %s has no timestamp, "
+      GST_WARNING_OBJECT (qtmux, "First buffer for pad %s has no timestamp, "
           "using 0 as first timestamp", GST_PAD_NAME (pad->collect.pad));
       pad->first_ts = 0;
     }
     GST_DEBUG_OBJECT (qtmux, "Stored first timestamp for pad %s %"
         GST_TIME_FORMAT, GST_PAD_NAME (pad->collect.pad),
         GST_TIME_ARGS (pad->first_ts));
-
   }
 
   if (last_buf && buf && GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DTS (buf)) &&
@@ -2488,7 +2570,6 @@ gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf)
   }
 
   if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DTS (last_buf))) {
-    do_pts = TRUE;
     last_dts = gst_util_uint64_scale_round (GST_BUFFER_DTS (last_buf),
         atom_trak_get_timescale (pad->trak), GST_SECOND);
     pts_offset =
@@ -2497,7 +2578,6 @@ gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf)
 
   } else {
     pts_offset = 0;
-    do_pts = TRUE;
     last_dts = gst_util_uint64_scale_round (GST_BUFFER_PTS (last_buf),
         atom_trak_get_timescale (pad->trak), GST_SECOND);
   }
@@ -2521,7 +2601,7 @@ gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf)
   /* now we go and register this buffer/sample all over */
   ret = gst_qt_mux_register_and_push_sample (qtmux, pad, last_buf,
       buf == NULL, nsamples, last_dts, scaled_duration, sample_size,
-      chunk_offset, sync, do_pts, pts_offset);
+      chunk_offset, sync, TRUE, pts_offset);
 
   /* if this is sparse and we have a next buffer, check if there is any gap
    * between them to insert an empty sample */
@@ -2544,7 +2624,7 @@ gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf)
       ret =
           gst_qt_mux_register_and_push_sample (qtmux, pad, empty_buf, FALSE, 1,
           last_dts + scaled_duration, empty_duration_scaled,
-          gst_buffer_get_size (empty_buf), qtmux->mdat_size, sync, do_pts, 0);
+          gst_buffer_get_size (empty_buf), qtmux->mdat_size, sync, TRUE, 0);
     } else {
       /* our only case currently is tx3g subtitles, so there is no reason to fill this yet */
       g_assert_not_reached ();
diff --git a/gst/isomp4/gstqtmux.h b/gst/isomp4/gstqtmux.h
index a9ea362a5a3b9c911b1bdc6d16d03b521eeeb9d6..0e30eb4a065efa321b421429f077a1809715fdca 100644
--- a/gst/isomp4/gstqtmux.h
+++ b/gst/isomp4/gstqtmux.h
@@ -144,6 +144,13 @@ typedef enum _GstQTMuxState
   GST_QT_MUX_STATE_EOS
 } GstQTMuxState;
 
+typedef enum _GstQtMuxMode {
+    GST_QT_MUX_MODE_MOOV_AT_END,
+    GST_QT_MUX_MODE_FRAGMENTED,
+    GST_QT_MUX_MODE_FRAGMENTED_STREAMABLE,
+    GST_QT_MUX_MODE_FAST_START
+} GstQtMuxMode;
+
 struct _GstQTMux
 {
   GstElement element;
@@ -155,7 +162,11 @@ struct _GstQTMux
   /* state */
   GstQTMuxState state;
 
-  /* size of header (prefix, atoms (ftyp, mdat)) */
+  /* Mux mode, inferred from property
+   * set in gst_qt_mux_start_file() */
+  GstQtMuxMode mux_mode;
+
+  /* size of header (prefix, atoms (ftyp, possibly moov, mdat header)) */
   guint64 header_size;
   /* accumulated size of raw media data (a priori not including mdat header) */
   guint64 mdat_size;
@@ -196,6 +207,9 @@ struct _GstQTMux
   gchar *fast_start_file_path;
   gchar *moov_recov_file_path;
   guint32 fragment_duration;
+  /* Whether or not to work in 'streamable' mode and not
+   * seek to rewrite headers - only valid for fragmented
+   * mode. */
   gboolean streamable;
 
   /* for request pad naming */
diff --git a/gst/isomp4/gstrtpxqtdepay.c b/gst/isomp4/gstrtpxqtdepay.c
index 3bce461bc6514668b7ceda395714b5c3b3c9f037..9116ccc0b112b30af10f52cf2bdbea296dc5ebf0 100644
--- a/gst/isomp4/gstrtpxqtdepay.c
+++ b/gst/isomp4/gstrtpxqtdepay.c
@@ -73,7 +73,7 @@ enum
 
 enum
 {
-  ARG_0,
+  PROP_0,
 };
 
 static GstStaticPadTemplate gst_rtp_xqt_depay_src_template =
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index 153d031964ac8c6a518cb50284c6ffabb4cca89e..f50ff202db1547a3648dcbe44a1cee803bb06712 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -36,7 +36,7 @@
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch-1.0 filesrc location=test.mov ! qtdemux name=demux  demux.audio_0 ! decodebin ! audioconvert ! audioresample ! autoaudiosink   demux.video_0 ! queue ! decodebin ! videoconvert ! videoscale ! autovideosink
+ * gst-launch-1.0 filesrc location=test.mov ! qtdemux name=demux  demux.audio_0 ! queue ! decodebin ! audioconvert ! audioresample ! autoaudiosink   demux.video_0 ! queue ! decodebin ! videoconvert ! videoscale ! autovideosink
  * ]| Play (parse and decode) a .mov file and try to output it to
  * an automatically detected soundcard and videosink. If the MOV file contains
  * compressed audio or video data, this will only work if you have the
@@ -1416,6 +1416,7 @@ gst_qtdemux_perform_seek (GstQTDemux * qtdemux, GstSegment * segment,
   }
 
   /* and set all streams to the final position */
+  gst_flow_combiner_reset (qtdemux->flowcombiner);
   for (n = 0; n < qtdemux->n_streams; n++) {
     QtDemuxStream *stream = qtdemux->streams[n];
 
@@ -1431,6 +1432,7 @@ gst_qtdemux_perform_seek (GstQTDemux * qtdemux, GstSegment * segment,
   }
   segment->position = desired_offset;
   segment->time = desired_offset;
+  segment->start = desired_offset;
 
   /* we stop at the end */
   if (segment->stop == -1)
@@ -1530,6 +1532,7 @@ gst_qtdemux_do_seek (GstQTDemux * qtdemux, GstPad * pad, GstEvent * event)
     gst_element_post_message (GST_ELEMENT_CAST (qtdemux), msg);
   }
 
+  /* restart streaming, NEWSEGMENT will be sent from the streaming thread. */
   gst_pad_start_task (qtdemux->sinkpad, (GstTaskFunction) gst_qtdemux_loop,
       qtdemux->sinkpad, NULL);
 
@@ -1896,9 +1899,11 @@ gst_qtdemux_reset (GstQTDemux * qtdemux, gboolean hard)
     qtdemux->timescale = 0;
     qtdemux->got_moov = FALSE;
   } else if (qtdemux->mss_mode) {
+    gst_flow_combiner_reset (qtdemux->flowcombiner);
     for (n = 0; n < qtdemux->n_streams; n++)
       gst_qtdemux_stream_clear (qtdemux, qtdemux->streams[n]);
   } else {
+    gst_flow_combiner_reset (qtdemux->flowcombiner);
     for (n = 0; n < qtdemux->n_streams; n++) {
       qtdemux->streams[n]->sent_eos = FALSE;
       qtdemux->streams[n]->segment_seqnum = 0;
@@ -2365,7 +2370,7 @@ extract_initial_length_and_fourcc (const guint8 * data, guint size,
   GST_DEBUG ("atom type %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc));
 
   if (length == 0) {
-    length = G_MAXUINT32;
+    length = G_MAXUINT64;
   } else if (length == 1 && size >= 16) {
     /* this means we have an extended size, which is the 64 bit value of
      * the next 8 bytes */
@@ -3236,6 +3241,15 @@ broken_file:
   }
 }
 
+static guint64
+add_offset (guint64 offset, guint64 advance)
+{
+  /* Avoid 64-bit overflow by clamping */
+  if (offset > G_MAXUINT64 - advance)
+    return G_MAXUINT64;
+  return offset + advance;
+}
+
 static GstFlowReturn
 gst_qtdemux_loop_state_header (GstQTDemux * qtdemux)
 {
@@ -3289,7 +3303,7 @@ gst_qtdemux_loop_state_header (GstQTDemux * qtdemux)
       GST_LOG_OBJECT (qtdemux,
           "skipping atom '%" GST_FOURCC_FORMAT "' at %" G_GUINT64_FORMAT,
           GST_FOURCC_ARGS (fourcc), cur_offset);
-      qtdemux->offset += length;
+      qtdemux->offset = add_offset (qtdemux->offset, length);
       break;
     }
     case FOURCC_moov:
@@ -3298,7 +3312,7 @@ gst_qtdemux_loop_state_header (GstQTDemux * qtdemux)
 
       if (qtdemux->got_moov) {
         GST_DEBUG_OBJECT (qtdemux, "Skipping moov atom as we have one already");
-        qtdemux->offset += length;
+        qtdemux->offset = add_offset (qtdemux->offset, length);
         goto beach;
       }
 
@@ -3712,9 +3726,9 @@ gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream,
 
   /* update the segment values used for clipping */
   /* accumulate previous segments */
-  if (GST_CLOCK_TIME_IS_VALID (stream->segment.stop))
-    stream->segment.base += (stream->segment.stop - stream->segment.start) /
-        ABS (stream->segment.rate);
+  stream->segment.offset = qtdemux->segment.offset;
+  stream->segment.base = qtdemux->segment.base;
+  stream->segment.applied_rate = qtdemux->segment.applied_rate;
   stream->segment.rate = rate;
   stream->segment.start = start;
   stream->segment.stop = stop;
@@ -3728,6 +3742,8 @@ gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream,
       gst_event_set_seqnum (event, stream->segment_seqnum);
     }
     gst_pad_push_event (stream->pad, event);
+    /* assume we can send more data now */
+    GST_PAD_LAST_FLOW_RETURN (stream->pad) = GST_FLOW_OK;
     /* clear to send tags on this pad now */
     gst_qtdemux_push_tags (qtdemux, stream);
   }
@@ -4052,11 +4068,16 @@ gst_qtdemux_sync_streams (GstQTDemux * demux)
  *  GST_FLOW_EOS: when all pads EOS or NOT_LINKED.
  */
 static GstFlowReturn
-gst_qtdemux_combine_flows (GstQTDemux * demux, GstFlowReturn ret)
+gst_qtdemux_combine_flows (GstQTDemux * demux, QtDemuxStream * stream,
+    GstFlowReturn ret)
 {
   GST_LOG_OBJECT (demux, "flow return: %s", gst_flow_get_name (ret));
 
-  ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret);
+  if (stream->pad)
+    ret = gst_flow_combiner_update_pad_flow (demux->flowcombiner, stream->pad,
+        ret);
+  else
+    ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret);
 
   GST_LOG_OBJECT (demux, "combined flow return: %s", gst_flow_get_name (ret));
   return ret;
@@ -4657,7 +4678,7 @@ gst_qtdemux_loop_state_movie (GstQTDemux * qtdemux)
   }
 
   /* combine flows */
-  ret = gst_qtdemux_combine_flows (qtdemux, ret);
+  ret = gst_qtdemux_combine_flows (qtdemux, stream, ret);
   /* ignore unlinked, we will not push on the pad anymore and we will EOS when
    * we have no more data for the pad to push */
   if (ret == GST_FLOW_EOS)
@@ -5324,7 +5345,6 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
         break;
       }
       case QTDEMUX_STATE_MOVIE:{
-        GstBuffer *outbuf;
         QtDemuxStream *stream = NULL;
         QtDemuxSample *sample;
         int i = -1;
@@ -5419,12 +5439,9 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
         sample = &stream->samples[stream->sample_index];
 
         if (G_LIKELY (!(STREAM_IS_EOS (stream)))) {
-          outbuf = gst_adapter_take_buffer (demux->adapter, demux->neededbytes);
           GST_DEBUG_OBJECT (demux, "stream : %" GST_FOURCC_FORMAT,
               GST_FOURCC_ARGS (stream->fourcc));
 
-          g_return_val_if_fail (outbuf != NULL, GST_FLOW_ERROR);
-
           dts = QTSAMPLE_DTS (stream, sample);
           pts = QTSAMPLE_PTS (stream, sample);
           duration = QTSAMPLE_DUR_DTS (stream, sample, dts);
@@ -5436,6 +5453,9 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
             GST_DEBUG_OBJECT (demux, "we reached the end of our segment.");
             stream->time_position = GST_CLOCK_TIME_NONE;        /* this means EOS */
 
+            /* skip this data, stream is EOS */
+            gst_adapter_flush (demux->adapter, demux->neededbytes);
+
             /* check if all streams are eos */
             ret = GST_FLOW_EOS;
             for (i = 0; i < demux->n_streams; i++) {
@@ -5450,12 +5470,20 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
               goto eos;
             }
           } else {
+            GstBuffer *outbuf;
+
+            outbuf =
+                gst_adapter_take_buffer (demux->adapter, demux->neededbytes);
+
+            /* FIXME: should either be an assert or a plain check */
+            g_return_val_if_fail (outbuf != NULL, GST_FLOW_ERROR);
+
             ret = gst_qtdemux_decorate_and_push_buffer (demux, stream, outbuf,
                 dts, pts, duration, keyframe, dts, demux->offset);
           }
 
           /* combine flows */
-          ret = gst_qtdemux_combine_flows (demux, ret);
+          ret = gst_qtdemux_combine_flows (demux, stream, ret);
         } else {
           /* skip this data, stream is EOS */
           gst_adapter_flush (demux->adapter, demux->neededbytes);
@@ -6370,10 +6398,13 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux,
     if (stream->pending_tags)
       gst_tag_list_unref (stream->pending_tags);
     stream->pending_tags = list;
+    list = NULL;
     /* global tags go on each pad anyway */
     stream->send_global_tags = TRUE;
   }
 done:
+  if (list)
+    gst_tag_list_unref (list);
   return TRUE;
 }
 
@@ -9247,7 +9278,7 @@ skip_track:
   {
     GST_INFO_OBJECT (qtdemux, "skip disabled track");
     if (new_stream)
-      g_free (stream);
+      gst_qtdemux_stream_free (qtdemux, stream);
     return TRUE;
   }
 corrupt_file:
@@ -9255,14 +9286,14 @@ corrupt_file:
     GST_ELEMENT_ERROR (qtdemux, STREAM, DEMUX,
         (_("This file is corrupt and cannot be played.")), (NULL));
     if (new_stream)
-      g_free (stream);
+      gst_qtdemux_stream_free (qtdemux, stream);
     return FALSE;
   }
 error_encrypted:
   {
     GST_ELEMENT_ERROR (qtdemux, STREAM, DECRYPT, (NULL), (NULL));
     if (new_stream)
-      g_free (stream);
+      gst_qtdemux_stream_free (qtdemux, stream);
     return FALSE;
   }
 samples_failed:
@@ -9272,7 +9303,7 @@ segments_failed:
     /* free stbl sub-atoms */
     gst_qtdemux_stbl_free (stream);
     if (new_stream)
-      g_free (stream);
+      gst_qtdemux_stream_free (qtdemux, stream);
     return FALSE;
   }
 existing_stream:
@@ -9280,7 +9311,7 @@ existing_stream:
     GST_INFO_OBJECT (qtdemux, "stream with track id %i already exists",
         track_id);
     if (new_stream)
-      g_free (stream);
+      gst_qtdemux_stream_free (qtdemux, stream);
     return TRUE;
   }
 unknown_stream:
@@ -9288,7 +9319,7 @@ unknown_stream:
     GST_INFO_OBJECT (qtdemux, "unknown subtype %" GST_FOURCC_FORMAT,
         GST_FOURCC_ARGS (stream->subtype));
     if (new_stream)
-      g_free (stream);
+      gst_qtdemux_stream_free (qtdemux, stream);
     return TRUE;
   }
 too_many_streams:
@@ -9450,7 +9481,7 @@ qtdemux_prepare_streams (GstQTDemux * qtdemux)
         break;
       ++sample_num;
     }
-    if (stream->n_samples > 0 && stream->stbl_index > 0) {
+    if (stream->n_samples > 0 && stream->stbl_index >= 0) {
       stream->first_duration = stream->samples[0].duration;
       GST_LOG_OBJECT (qtdemux, "stream %d first duration %u",
           stream->track_id, stream->first_duration);
@@ -10610,32 +10641,44 @@ qtdemux_parse_redirects (GstQTDemux * qtdemux)
       if (rdrf) {
         guint32 ref_type;
         guint8 *ref_data;
-
-        ref_type = QT_FOURCC ((guint8 *) rdrf->data + 12);
-        ref_data = (guint8 *) rdrf->data + 20;
-        if (ref_type == FOURCC_alis) {
-          guint record_len, record_version, fn_len;
-
-          /* MacOSX alias record, google for alias-layout.txt */
-          record_len = QT_UINT16 (ref_data + 4);
-          record_version = QT_UINT16 (ref_data + 4 + 2);
-          fn_len = QT_UINT8 (ref_data + 50);
-          if (record_len > 50 && record_version == 2 && fn_len > 0) {
-            ref.location = g_strndup ((gchar *) ref_data + 51, fn_len);
+        guint ref_len;
+
+        ref_len = QT_UINT32 ((guint8 *) rdrf->data);
+        if (ref_len > 20) {
+          ref_type = QT_FOURCC ((guint8 *) rdrf->data + 12);
+          ref_data = (guint8 *) rdrf->data + 20;
+          if (ref_type == FOURCC_alis) {
+            guint record_len, record_version, fn_len;
+
+            if (ref_len > 70) {
+              /* MacOSX alias record, google for alias-layout.txt */
+              record_len = QT_UINT16 (ref_data + 4);
+              record_version = QT_UINT16 (ref_data + 4 + 2);
+              fn_len = QT_UINT8 (ref_data + 50);
+              if (record_len > 50 && record_version == 2 && fn_len > 0) {
+                ref.location = g_strndup ((gchar *) ref_data + 51, fn_len);
+              }
+            } else {
+              GST_WARNING_OBJECT (qtdemux, "Invalid rdrf/alis size (%u < 70)",
+                  ref_len);
+            }
+          } else if (ref_type == FOURCC_url_) {
+            ref.location = g_strndup ((gchar *) ref_data, ref_len - 8);
+          } else {
+            GST_DEBUG_OBJECT (qtdemux,
+                "unknown rdrf reference type %" GST_FOURCC_FORMAT,
+                GST_FOURCC_ARGS (ref_type));
+          }
+          if (ref.location != NULL) {
+            GST_INFO_OBJECT (qtdemux, "New location: %s", ref.location);
+            redirects =
+                g_list_prepend (redirects, g_memdup (&ref, sizeof (ref)));
+          } else {
+            GST_WARNING_OBJECT (qtdemux,
+                "Failed to extract redirect location from rdrf atom");
           }
-        } else if (ref_type == FOURCC_url_) {
-          ref.location = g_strdup ((gchar *) ref_data);
-        } else {
-          GST_DEBUG_OBJECT (qtdemux,
-              "unknown rdrf reference type %" GST_FOURCC_FORMAT,
-              GST_FOURCC_ARGS (ref_type));
-        }
-        if (ref.location != NULL) {
-          GST_INFO_OBJECT (qtdemux, "New location: %s", ref.location);
-          redirects = g_list_prepend (redirects, g_memdup (&ref, sizeof (ref)));
         } else {
-          GST_WARNING_OBJECT (qtdemux,
-              "Failed to extract redirect location from rdrf atom");
+          GST_WARNING_OBJECT (qtdemux, "Invalid rdrf size (%u < 20)", ref_len);
         }
       }
 
diff --git a/gst/law/Makefile.am b/gst/law/Makefile.am
index 430fd6dcffcc7d6e65456760c5ccd99513bdc82c..2591c78fd3d95d86aa1b13baf1f8457e5a67d723 100644
--- a/gst/law/Makefile.am
+++ b/gst/law/Makefile.am
@@ -15,28 +15,3 @@ libgstmulaw_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstmulaw_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = mulaw-conversion.h alaw-encode.h alaw-decode.h mulaw-encode.h mulaw-decode.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstalaw -:SHARED libgstalaw \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstalaw_la_SOURCES) \
-	 	   $(nodist_libgstalaw_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstalaw_la_CFLAGS) \
-	 -:LDFLAGS $(libgstalaw_la_LDFLAGS) \
-	           $(libgstalaw_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	-:SHARED libgstmulaw \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmulaw_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmulaw_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmulaw_la_LDFLAGS) \
-	           $(libgstmulaw_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/law/Makefile.in b/gst/law/Makefile.in
index a1ab32d5abeb2c479062a2e561f1a9ebc18f6b2d..55888c5d12c9e6f6588175bbadc18dc8352134e1 100644
--- a/gst/law/Makefile.in
+++ b/gst/law/Makefile.in
@@ -953,31 +953,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstalaw -:SHARED libgstalaw \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstalaw_la_SOURCES) \
-	 	   $(nodist_libgstalaw_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstalaw_la_CFLAGS) \
-	 -:LDFLAGS $(libgstalaw_la_LDFLAGS) \
-	           $(libgstalaw_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	-:SHARED libgstmulaw \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmulaw_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmulaw_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmulaw_la_LDFLAGS) \
-	           $(libgstmulaw_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/law/mulaw-decode.c b/gst/law/mulaw-decode.c
index cc3efa13be0f7592460c57e94633d4799a4c50f7..02ccd4bfa7b0a8d0f9b4a0d8197ff65a4eeec62b 100644
--- a/gst/law/mulaw-decode.c
+++ b/gst/law/mulaw-decode.c
@@ -47,7 +47,7 @@ enum
 
 enum
 {
-  ARG_0
+  PROP_0
 };
 
 #define gst_mulawdec_parent_class parent_class
diff --git a/gst/law/mulaw-encode.c b/gst/law/mulaw-encode.c
index ed943af52815538d56ce652ad7ba919755f3be9b..e92e5e6d17db5e8e1bb7a6e216277a98812868b3 100644
--- a/gst/law/mulaw-encode.c
+++ b/gst/law/mulaw-encode.c
@@ -43,7 +43,7 @@ enum
 
 enum
 {
-  ARG_0
+  PROP_0
 };
 
 static gboolean gst_mulawenc_start (GstAudioEncoder * audioenc);
diff --git a/gst/level/Makefile.am b/gst/level/Makefile.am
index cca655c22c87d23f1800d4932533a84743e7142f..dbcb39390a56d8dae979d1ffe3a5ca48d8cf04c7 100644
--- a/gst/level/Makefile.am
+++ b/gst/level/Makefile.am
@@ -7,18 +7,3 @@ libgstlevel_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstlevel_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstlevel.h
-
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstlevel -:SHARED libgstlevel \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstlevel_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstlevel_la_CFLAGS) \
-	 -:LDFLAGS $(libgstlevel_la_LDFLAGS) \
-	           $(libgstlevel_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/level/Makefile.in b/gst/level/Makefile.in
index b0da78808bb190f1cfa120d51838c4db9e20c956..42d3aaaf0f0eb1fb51336555ff8127b0107ef342 100644
--- a/gst/level/Makefile.in
+++ b/gst/level/Makefile.in
@@ -882,20 +882,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstlevel -:SHARED libgstlevel \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstlevel_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstlevel_la_CFLAGS) \
-	 -:LDFLAGS $(libgstlevel_la_LDFLAGS) \
-	           $(libgstlevel_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/level/gstlevel.c b/gst/level/gstlevel.c
index a308267d690bcc7224bf1b740c11e2cca96f8c25..1141db66061e23f17cfd9361bb474a9c415fc8d5 100644
--- a/gst/level/gstlevel.c
+++ b/gst/level/gstlevel.c
@@ -168,7 +168,7 @@ static GstFlowReturn gst_level_transform_ip (GstBaseTransform * trans,
 static void gst_level_post_message (GstLevel * filter);
 static gboolean gst_level_sink_event (GstBaseTransform * trans,
     GstEvent * event);
-
+static void gst_level_recalc_interval_frames (GstLevel * level);
 
 static void
 gst_level_class_init (GstLevelClass * klass)
@@ -299,10 +299,10 @@ gst_level_set_property (GObject * object, guint prop_id,
       break;
     case PROP_INTERVAL:
       filter->interval = g_value_get_uint64 (value);
+      /* Not exactly thread-safe, but property does not advertise that it
+       * can be changed at runtime anyway */
       if (GST_AUDIO_INFO_RATE (&filter->info)) {
-        filter->interval_frames =
-            GST_CLOCK_TIME_TO_FRAMES (filter->interval,
-            GST_AUDIO_INFO_RATE (&filter->info));
+        gst_level_recalc_interval_frames (filter);
       }
       break;
     case PROP_PEAK_TTL:
@@ -431,13 +431,36 @@ gst_level_calculate_gdouble (gpointer data, guint num, guint channels,
 }
 */
 
+static void
+gst_level_recalc_interval_frames (GstLevel * level)
+{
+  GstClockTime interval = level->interval;
+  guint sample_rate = GST_AUDIO_INFO_RATE (&level->info);
+  guint interval_frames;
+
+  interval_frames = GST_CLOCK_TIME_TO_FRAMES (interval, sample_rate);
+
+  if (interval_frames == 0) {
+    GST_WARNING_OBJECT (level, "interval %" GST_TIME_FORMAT " is too small, "
+        "should be at least %" GST_TIME_FORMAT " for sample rate %u",
+        GST_TIME_ARGS (interval),
+        GST_TIME_ARGS (GST_FRAMES_TO_CLOCK_TIME (1, sample_rate)), sample_rate);
+    interval_frames = 1;
+  }
+
+  level->interval_frames = interval_frames;
+
+  GST_INFO_OBJECT (level, "interval_frames now %u for interval "
+      "%" GST_TIME_FORMAT " and sample rate %u", interval_frames,
+      GST_TIME_ARGS (interval), sample_rate);
+}
 
 static gboolean
 gst_level_set_caps (GstBaseTransform * trans, GstCaps * in, GstCaps * out)
 {
   GstLevel *filter = GST_LEVEL (trans);
   GstAudioInfo info;
-  gint i, channels, rate;
+  gint i, channels;
 
   if (!gst_audio_info_from_caps (&info, in))
     return FALSE;
@@ -466,7 +489,6 @@ gst_level_set_caps (GstBaseTransform * trans, GstCaps * in, GstCaps * out)
   filter->info = info;
 
   channels = GST_AUDIO_INFO_CHANNELS (&info);
-  rate = GST_AUDIO_INFO_RATE (&info);
 
   /* allocate channel variable arrays */
   g_free (filter->CS);
@@ -489,7 +511,7 @@ gst_level_set_caps (GstBaseTransform * trans, GstCaps * in, GstCaps * out)
     filter->decay_peak_age[i] = G_GUINT64_CONSTANT (0);
   }
 
-  filter->interval_frames = GST_CLOCK_TIME_TO_FRAMES (filter->interval, rate);
+  gst_level_recalc_interval_frames (filter);
 
   return TRUE;
 }
diff --git a/gst/matroska/Makefile.am b/gst/matroska/Makefile.am
index 3b19d4d0848c21e04d4ba2ccca22b84f897937ec..960a831ee03cb6372cdf65177e6f205089d0ebf5 100644
--- a/gst/matroska/Makefile.am
+++ b/gst/matroska/Makefile.am
@@ -42,18 +42,3 @@ libgstmatroska_la_LIBADD = \
 	$(LIBM)
 libgstmatroska_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstmatroska_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmatroska -:SHARED libgstmatroska \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmatroska_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(libgstmatroska_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmatroska_la_LDFLAGS) \
-	           $(libgstmatroska_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/matroska/Makefile.in b/gst/matroska/Makefile.in
index b315ac5aeb5c4e0c2a05886f698149ccb5bfa61a..8d4847e240b42a4a6f48e1dff33d607cfd46c93c 100644
--- a/gst/matroska/Makefile.in
+++ b/gst/matroska/Makefile.in
@@ -1001,20 +1001,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmatroska -:SHARED libgstmatroska \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmatroska_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(libgstmatroska_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmatroska_la_LDFLAGS) \
-	           $(libgstmatroska_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index 251adfff6aac5989cd1b96c0864a3c838bcad728..0ee13b378397642a0e3f46907d59a5dbadc39bb0 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -80,10 +80,10 @@ GST_DEBUG_CATEGORY_STATIC (matroskademux_debug);
 
 enum
 {
-  ARG_0,
-  ARG_METADATA,
-  ARG_STREAMINFO,
-  ARG_MAX_GAP_TIME
+  PROP_0,
+  PROP_METADATA,
+  PROP_STREAMINFO,
+  PROP_MAX_GAP_TIME
 };
 
 #define  DEFAULT_MAX_GAP_TIME      (2 * GST_SECOND)
@@ -208,7 +208,7 @@ gst_matroska_demux_class_init (GstMatroskaDemuxClass * klass)
   gobject_class->get_property = gst_matroska_demux_get_property;
   gobject_class->set_property = gst_matroska_demux_set_property;
 
-  g_object_class_install_property (gobject_class, ARG_MAX_GAP_TIME,
+  g_object_class_install_property (gobject_class, PROP_MAX_GAP_TIME,
       g_param_spec_uint64 ("max-gap-time", "Maximum gap time",
           "The demuxer sends out segment events for skipping "
           "gaps longer than this (0 = disabled).", 0, G_MAXUINT64,
@@ -401,7 +401,6 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml)
   GstFlowReturn ret;
   guint32 id, riff_fourcc = 0;
   guint16 riff_audio_fmt = 0;
-  GstTagList *list = NULL;
   GstEvent *stream_start;
   gchar *codec = NULL;
   gchar *stream_id;
@@ -434,6 +433,7 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml)
   context->alignment = 1;
   context->dts_only = FALSE;
   context->intra_only = FALSE;
+  context->tags = gst_tag_list_new_empty ();
   demux->common.num_streams++;
   g_assert (demux->common.src->len == demux->common.num_streams);
 
@@ -1094,7 +1094,9 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml)
           context->codec_priv_size, &codec, &riff_fourcc);
 
       if (codec) {
-        list = gst_tag_list_new (GST_TAG_VIDEO_CODEC, codec, NULL);
+        gst_tag_list_add (context->tags, GST_TAG_MERGE_REPLACE,
+            GST_TAG_VIDEO_CODEC, codec, NULL);
+        context->tags_changed = TRUE;
         g_free (codec);
       }
       break;
@@ -1111,7 +1113,9 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml)
           &codec, &riff_audio_fmt);
 
       if (codec) {
-        list = gst_tag_list_new (GST_TAG_AUDIO_CODEC, codec, NULL);
+        gst_tag_list_add (context->tags, GST_TAG_MERGE_REPLACE,
+            GST_TAG_AUDIO_CODEC, codec, NULL);
+        context->tags_changed = TRUE;
         g_free (codec);
       }
       break;
@@ -1147,13 +1151,11 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml)
   if (context->language) {
     const gchar *lang;
 
-    if (!list)
-      list = gst_tag_list_new_empty ();
-
     /* Matroska contains ISO 639-2B codes, we want ISO 639-1 */
     lang = gst_tag_get_language_code (context->language);
-    gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
+    gst_tag_list_add (context->tags, GST_TAG_MERGE_REPLACE,
         GST_TAG_LANGUAGE_CODE, (lang) ? lang : context->language, NULL);
+    context->tags_changed = TRUE;
   }
 
   if (caps == NULL) {
@@ -1203,8 +1205,6 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml)
   GST_INFO_OBJECT (demux, "Adding pad '%s' with caps %" GST_PTR_FORMAT,
       padname, caps);
 
-  context->pending_tags = list;
-
   gst_pad_set_element_private (context->pad, context);
 
   gst_pad_use_fixed_caps (context->pad);
@@ -1240,6 +1240,29 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml)
   gst_pad_push_event (context->pad, stream_start);
   gst_pad_set_caps (context->pad, context->caps);
 
+
+  if (demux->common.global_tags) {
+    GstEvent *tag_event;
+
+    gst_tag_list_add (demux->common.global_tags, GST_TAG_MERGE_REPLACE,
+        GST_TAG_CONTAINER_FORMAT, "Matroska", NULL);
+    GST_DEBUG_OBJECT (context->pad, "Sending global_tags %p: %" GST_PTR_FORMAT,
+        demux->common.global_tags, demux->common.global_tags);
+
+    tag_event =
+        gst_event_new_tag (gst_tag_list_copy (demux->common.global_tags));
+
+    gst_pad_push_event (context->pad, tag_event);
+  }
+
+  if (G_UNLIKELY (context->tags_changed)) {
+    GST_DEBUG_OBJECT (context->pad, "Sending tags %p: %"
+        GST_PTR_FORMAT, context->tags, context->tags);
+    gst_pad_push_event (context->pad,
+        gst_event_new_tag (gst_tag_list_copy (context->tags)));
+    context->tags_changed = FALSE;
+  }
+
   gst_element_add_pad (GST_ELEMENT (demux), context->pad);
   gst_flow_combiner_add_pad (demux->flowcombiner, context->pad);
 
@@ -1424,14 +1447,15 @@ gst_matroska_demux_send_tags (GstMatroskaDemux * demux)
 {
   gint i;
 
-  if (G_UNLIKELY (demux->common.global_tags != NULL)) {
+  if (G_UNLIKELY (demux->common.global_tags_changed)) {
     GstEvent *tag_event;
     gst_tag_list_add (demux->common.global_tags, GST_TAG_MERGE_REPLACE,
         GST_TAG_CONTAINER_FORMAT, "Matroska", NULL);
     GST_DEBUG_OBJECT (demux, "Sending global_tags %p : %" GST_PTR_FORMAT,
         demux->common.global_tags, demux->common.global_tags);
 
-    tag_event = gst_event_new_tag (demux->common.global_tags);
+    tag_event =
+        gst_event_new_tag (gst_tag_list_copy (demux->common.global_tags));
 
     for (i = 0; i < demux->common.src->len; i++) {
       GstMatroskaTrackContext *stream;
@@ -1441,7 +1465,7 @@ gst_matroska_demux_send_tags (GstMatroskaDemux * demux)
     }
 
     gst_event_unref (tag_event);
-    demux->common.global_tags = NULL;
+    demux->common.global_tags_changed = FALSE;
   }
 
   g_assert (demux->common.src->len == demux->common.num_streams);
@@ -1450,13 +1474,13 @@ gst_matroska_demux_send_tags (GstMatroskaDemux * demux)
 
     stream = g_ptr_array_index (demux->common.src, i);
 
-    if (G_UNLIKELY (stream->pending_tags != NULL)) {
-      GST_DEBUG_OBJECT (demux, "Sending pending_tags %p for pad %s:%s : %"
-          GST_PTR_FORMAT, stream->pending_tags,
-          GST_DEBUG_PAD_NAME (stream->pad), stream->pending_tags);
+    if (G_UNLIKELY (stream->tags_changed)) {
+      GST_DEBUG_OBJECT (demux, "Sending tags %p for pad %s:%s : %"
+          GST_PTR_FORMAT, stream->tags,
+          GST_DEBUG_PAD_NAME (stream->pad), stream->tags);
       gst_pad_push_event (stream->pad,
-          gst_event_new_tag (stream->pending_tags));
-      stream->pending_tags = NULL;
+          gst_event_new_tag (gst_tag_list_copy (stream->tags)));
+      stream->tags_changed = FALSE;
     }
   }
 }
@@ -1501,6 +1525,7 @@ gst_matroska_demux_move_to_entry (GstMatroskaDemux * demux,
 
     /* update the time */
     gst_matroska_read_common_reset_streams (&demux->common, entry->time, TRUE);
+    gst_flow_combiner_reset (demux->flowcombiner);
     demux->common.segment.position = entry->time;
     demux->seek_block = entry->block;
     demux->seek_first = TRUE;
@@ -3654,7 +3679,8 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
         }
       }
       /* combine flows */
-      ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret);
+      ret = gst_flow_combiner_update_pad_flow (demux->flowcombiner,
+          stream->pad, ret);
 
     next_lace:
       size -= lace_size[n];
@@ -3680,7 +3706,8 @@ eos:
     stream->eos = TRUE;
     ret = GST_FLOW_OK;
     /* combine flows */
-    ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret);
+    ret = gst_flow_combiner_update_pad_flow (demux->flowcombiner, stream->pad,
+        ret);
     goto done;
   }
 invalid_lacing:
@@ -4350,8 +4377,11 @@ gst_matroska_demux_parse_id (GstMatroskaDemux * demux, guint32 id,
 
             g_assert (event);
             /* unlikely to fail, since we managed to seek to this point */
-            if (!gst_matroska_demux_handle_seek_event (demux, NULL, event))
+            if (!gst_matroska_demux_handle_seek_event (demux, NULL, event)) {
+              gst_event_unref (event);
               goto seek_failed;
+            }
+            gst_event_unref (event);
             /* resume data handling, main thread clear to seek again */
             GST_OBJECT_LOCK (demux);
             demux->common.state = GST_MATROSKA_READ_STATE_DATA;
@@ -4743,6 +4773,7 @@ gst_matroska_demux_handle_sink_event (GstPad * pad, GstObject * parent,
       GST_OBJECT_LOCK (demux);
       gst_matroska_read_common_reset_streams (&demux->common,
           GST_CLOCK_TIME_NONE, TRUE);
+      gst_flow_combiner_reset (demux->flowcombiner);
       dur = demux->common.segment.duration;
       gst_segment_init (&demux->common.segment, GST_FORMAT_TIME);
       demux->common.segment.duration = dur;
@@ -5714,7 +5745,7 @@ gst_matroska_demux_set_property (GObject * object,
   demux = GST_MATROSKA_DEMUX (object);
 
   switch (prop_id) {
-    case ARG_MAX_GAP_TIME:
+    case PROP_MAX_GAP_TIME:
       GST_OBJECT_LOCK (demux);
       demux->max_gap_time = g_value_get_uint64 (value);
       GST_OBJECT_UNLOCK (demux);
@@ -5735,7 +5766,7 @@ gst_matroska_demux_get_property (GObject * object,
   demux = GST_MATROSKA_DEMUX (object);
 
   switch (prop_id) {
-    case ARG_MAX_GAP_TIME:
+    case PROP_MAX_GAP_TIME:
       GST_OBJECT_LOCK (demux);
       g_value_set_uint64 (value, demux->max_gap_time);
       GST_OBJECT_UNLOCK (demux);
diff --git a/gst/matroska/matroska-ids.c b/gst/matroska/matroska-ids.c
index 444084b959264c22b7c04cac13d6613c17c27f53..65af1cc4c543f0fb540b74f79434670e2992449a 100644
--- a/gst/matroska/matroska-ids.c
+++ b/gst/matroska/matroska-ids.c
@@ -331,8 +331,8 @@ gst_matroska_track_free (GstMatroskaTrackContext * track)
     g_array_free (track->encodings, TRUE);
   }
 
-  if (track->pending_tags)
-    gst_tag_list_unref (track->pending_tags);
+  if (track->tags)
+    gst_tag_list_unref (track->tags);
 
   if (track->index_table)
     g_array_free (track->index_table, TRUE);
diff --git a/gst/matroska/matroska-ids.h b/gst/matroska/matroska-ids.h
index dc098dd5c13a59501637f9236c9bef220a4b1871..41315a052b76fb7b2fb721e85ad8a5aaa86f5029 100644
--- a/gst/matroska/matroska-ids.h
+++ b/gst/matroska/matroska-ids.h
@@ -540,8 +540,10 @@ struct _GstMatroskaTrackContext {
                                       GstMatroskaTrackContext *context,
 				      GstBuffer **buffer);
 
-  /* Tags to send after newsegment event */
-  GstTagList   *pending_tags;
+  /* List of tags for this stream */
+  GstTagList   *tags;
+  /* Tags changed and should be pushed again */
+  gboolean      tags_changed;
 
   /* A GArray of GstMatroskaTrackEncoding structures which contain the
    * encoding (compression/encryption) settings for this track, if any */
diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c
index 1ccc325c088ae6d1087531a3e3b3f1155b2b7a24..0e28ed32143aea37cc23805809056d05620f141b 100644
--- a/gst/matroska/matroska-mux.c
+++ b/gst/matroska/matroska-mux.c
@@ -64,11 +64,11 @@ GST_DEBUG_CATEGORY_STATIC (matroskamux_debug);
 
 enum
 {
-  ARG_0,
-  ARG_WRITING_APP,
-  ARG_DOCTYPE_VERSION,
-  ARG_MIN_INDEX_INTERVAL,
-  ARG_STREAMABLE
+  PROP_0,
+  PROP_WRITING_APP,
+  PROP_DOCTYPE_VERSION,
+  PROP_MIN_INDEX_INTERVAL,
+  PROP_STREAMABLE
 };
 
 #define  DEFAULT_DOCTYPE_VERSION         2
@@ -311,21 +311,21 @@ gst_matroska_mux_class_init (GstMatroskaMuxClass * klass)
   gobject_class->get_property = gst_matroska_mux_get_property;
   gobject_class->set_property = gst_matroska_mux_set_property;
 
-  g_object_class_install_property (gobject_class, ARG_WRITING_APP,
+  g_object_class_install_property (gobject_class, PROP_WRITING_APP,
       g_param_spec_string ("writing-app", "Writing application.",
           "The name the application that creates the matroska file.",
           NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_DOCTYPE_VERSION,
+  g_object_class_install_property (gobject_class, PROP_DOCTYPE_VERSION,
       g_param_spec_int ("version", "DocType version",
           "This parameter determines what Matroska features can be used.",
           1, 2, DEFAULT_DOCTYPE_VERSION,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_MIN_INDEX_INTERVAL,
+  g_object_class_install_property (gobject_class, PROP_MIN_INDEX_INTERVAL,
       g_param_spec_int64 ("min-index-interval", "Minimum time between index "
           "entries", "An index entry is created every so many nanoseconds.",
           0, G_MAXINT64, DEFAULT_MIN_INDEX_INTERVAL,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_STREAMABLE,
+  g_object_class_install_property (gobject_class, PROP_STREAMABLE,
       g_param_spec_boolean ("streamable", "Determines whether output should "
           "be streamable", "If set to true, the output should be as if it is "
           "to be streamed and hence no indexes written or duration written.",
@@ -3724,7 +3724,7 @@ gst_matroska_mux_set_property (GObject * object,
   mux = GST_MATROSKA_MUX (object);
 
   switch (prop_id) {
-    case ARG_WRITING_APP:
+    case PROP_WRITING_APP:
       if (!g_value_get_string (value)) {
         GST_WARNING_OBJECT (mux, "writing-app property can not be NULL");
         break;
@@ -3732,13 +3732,13 @@ gst_matroska_mux_set_property (GObject * object,
       g_free (mux->writing_app);
       mux->writing_app = g_value_dup_string (value);
       break;
-    case ARG_DOCTYPE_VERSION:
+    case PROP_DOCTYPE_VERSION:
       mux->doctype_version = g_value_get_int (value);
       break;
-    case ARG_MIN_INDEX_INTERVAL:
+    case PROP_MIN_INDEX_INTERVAL:
       mux->min_index_interval = g_value_get_int64 (value);
       break;
-    case ARG_STREAMABLE:
+    case PROP_STREAMABLE:
       mux->streamable = g_value_get_boolean (value);
       break;
     default:
@@ -3757,16 +3757,16 @@ gst_matroska_mux_get_property (GObject * object,
   mux = GST_MATROSKA_MUX (object);
 
   switch (prop_id) {
-    case ARG_WRITING_APP:
+    case PROP_WRITING_APP:
       g_value_set_string (value, mux->writing_app);
       break;
-    case ARG_DOCTYPE_VERSION:
+    case PROP_DOCTYPE_VERSION:
       g_value_set_int (value, mux->doctype_version);
       break;
-    case ARG_MIN_INDEX_INTERVAL:
+    case PROP_MIN_INDEX_INTERVAL:
       g_value_set_int64 (value, mux->min_index_interval);
       break;
-    case ARG_STREAMABLE:
+    case PROP_STREAMABLE:
       g_value_set_boolean (value, mux->streamable);
       break;
     default:
diff --git a/gst/matroska/matroska-parse.c b/gst/matroska/matroska-parse.c
index 1e86a252c652c61a08aef52c416b461005ba6092..53b4eaca72afe612934837ba65c53e4d3ee9d2f9 100644
--- a/gst/matroska/matroska-parse.c
+++ b/gst/matroska/matroska-parse.c
@@ -79,9 +79,7 @@ GST_DEBUG_CATEGORY_STATIC (matroskaparse_debug);
 
 enum
 {
-  ARG_0,
-  ARG_METADATA,
-  ARG_STREAMINFO
+  PROP_0
 };
 
 static GstStaticPadTemplate sink_templ = GST_STATIC_PAD_TEMPLATE ("sink",
@@ -1071,6 +1069,27 @@ gst_matroska_parse_handle_src_query (GstPad * pad, GstObject * parent,
   return ret;
 }
 
+static void
+gst_matroska_parse_send_tags (GstMatroskaParse * parse)
+{
+  if (G_UNLIKELY (parse->common.global_tags_changed)) {
+    GstEvent *tag_event;
+    gst_tag_list_add (parse->common.global_tags, GST_TAG_MERGE_REPLACE,
+        GST_TAG_CONTAINER_FORMAT, "Matroska", NULL);
+    GST_DEBUG_OBJECT (parse, "Sending global_tags %p : %" GST_PTR_FORMAT,
+        parse->common.global_tags, parse->common.global_tags);
+
+    /* Send a copy as we want to keep our local ref writable to add more tags
+     * if any are found */
+    tag_event =
+        gst_event_new_tag (gst_tag_list_copy (parse->common.global_tags));
+
+    gst_pad_push_event (parse->srcpad, tag_event);
+
+    parse->common.global_tags_changed = FALSE;
+  }
+}
+
 /* returns FALSE if there are no pads to deliver event to,
  * otherwise TRUE (whatever the outcome of event sending),
  * takes ownership of the passed event! */
@@ -2567,6 +2586,8 @@ gst_matroska_parse_parse_id (GstMatroskaParse * parse, guint32 id,
           if (!parse->common.segmentinfo_parsed) {
             ret = gst_matroska_read_common_parse_info (&parse->common,
                 GST_ELEMENT_CAST (parse), &ebml);
+            if (ret == GST_FLOW_OK)
+              gst_matroska_parse_send_tags (parse);
           }
           gst_matroska_parse_accumulate_streamheader (parse, ebml.buf);
           break;
@@ -2660,6 +2681,8 @@ gst_matroska_parse_parse_id (GstMatroskaParse * parse, guint32 id,
           if (!parse->common.attachments_parsed) {
             ret = gst_matroska_read_common_parse_attachments (&parse->common,
                 GST_ELEMENT_CAST (parse), &ebml);
+            if (ret == GST_FLOW_OK)
+              gst_matroska_parse_send_tags (parse);
           }
           gst_matroska_parse_output (parse, ebml.buf, FALSE);
           break;
@@ -2667,6 +2690,8 @@ gst_matroska_parse_parse_id (GstMatroskaParse * parse, guint32 id,
           GST_READ_CHECK (gst_matroska_parse_take (parse, read, &ebml));
           ret = gst_matroska_read_common_parse_metadata (&parse->common,
               GST_ELEMENT_CAST (parse), &ebml);
+          if (ret == GST_FLOW_OK)
+            gst_matroska_parse_send_tags (parse);
           gst_matroska_parse_accumulate_streamheader (parse, ebml.buf);
           break;
         case GST_MATROSKA_ID_CHAPTERS:
diff --git a/gst/matroska/matroska-read-common.c b/gst/matroska/matroska-read-common.c
index 59feb9c98e24c7bcdaa3992d0f512b186c56afef..0b8e700791a88ace944494e0193e5e1c4a29a349 100644
--- a/gst/matroska/matroska-read-common.c
+++ b/gst/matroska/matroska-read-common.c
@@ -452,6 +452,7 @@ gst_matroska_read_common_found_global_tag (GstMatroskaReadCommon * common,
   } else {
     common->global_tags = taglist;
   }
+  common->global_tags_changed = TRUE;
 }
 
 gint64
@@ -2209,71 +2210,67 @@ gst_matroska_read_common_apply_target_type_foreach (const GstTagList * list,
     return;
 
   for (i = 0; i < vallen; i++) {
-    GValue val = { 0 };
     const GValue *val_ref;
 
     val_ref = gst_tag_list_get_value_index (list, tag, i);
     if (val_ref == NULL)
       continue;
-    g_value_init (&val, G_VALUE_TYPE (val_ref));
-    g_value_copy (val_ref, &val);
 
     /* TODO: use the optional ctx->target_type somehow */
     if (strcmp (tag, GST_TAG_TITLE) == 0) {
       if (ctx->target_type_value >= 70 && !ctx->audio_only) {
         gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND,
-            GST_TAG_SHOW_NAME, &val);
+            GST_TAG_SHOW_NAME, val_ref);
         continue;
       } else if (ctx->target_type_value >= 50) {
         gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND,
-            GST_TAG_ALBUM, &val);
+            GST_TAG_ALBUM, val_ref);
         continue;
       }
     } else if (strcmp (tag, GST_TAG_TITLE_SORTNAME) == 0) {
       if (ctx->target_type_value >= 70 && !ctx->audio_only) {
         gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND,
-            GST_TAG_SHOW_SORTNAME, &val);
+            GST_TAG_SHOW_SORTNAME, val_ref);
         continue;
       } else if (ctx->target_type_value >= 50) {
         gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND,
-            GST_TAG_ALBUM_SORTNAME, &val);
+            GST_TAG_ALBUM_SORTNAME, val_ref);
         continue;
       }
     } else if (strcmp (tag, GST_TAG_ARTIST) == 0) {
       if (ctx->target_type_value >= 50) {
         gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND,
-            GST_TAG_ALBUM_ARTIST, &val);
+            GST_TAG_ALBUM_ARTIST, val_ref);
         continue;
       }
     } else if (strcmp (tag, GST_TAG_ARTIST_SORTNAME) == 0) {
       if (ctx->target_type_value >= 50) {
         gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND,
-            GST_TAG_ALBUM_ARTIST_SORTNAME, &val);
+            GST_TAG_ALBUM_ARTIST_SORTNAME, val_ref);
         continue;
       }
     } else if (strcmp (tag, GST_TAG_TRACK_COUNT) == 0) {
       if (ctx->target_type_value >= 60) {
         gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND,
-            GST_TAG_ALBUM_VOLUME_COUNT, &val);
+            GST_TAG_ALBUM_VOLUME_COUNT, val_ref);
         continue;
       }
     } else if (strcmp (tag, GST_TAG_TRACK_NUMBER) == 0) {
       if (ctx->target_type_value >= 60 && !ctx->audio_only) {
         gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND,
-            GST_TAG_SHOW_SEASON_NUMBER, &val);
+            GST_TAG_SHOW_SEASON_NUMBER, val_ref);
         continue;
       } else if (ctx->target_type_value >= 50 && !ctx->audio_only) {
         gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND,
-            GST_TAG_SHOW_EPISODE_NUMBER, &val);
+            GST_TAG_SHOW_EPISODE_NUMBER, val_ref);
         continue;
       } else if (ctx->target_type_value >= 50) {
         gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND,
-            GST_TAG_ALBUM_VOLUME_NUMBER, &val);
+            GST_TAG_ALBUM_VOLUME_NUMBER, val_ref);
         continue;
       }
     }
-    gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND, tag, &val);
-    g_value_unset (&val);
+    gst_tag_list_add_value (ctx->result, GST_TAG_MERGE_APPEND, tag, val_ref);
   }
 }
 
@@ -2387,16 +2384,13 @@ gst_matroska_read_common_parse_metadata_id_tag (GstMatroskaReadCommon * common,
         GstMatroskaTrackContext *stream = g_ptr_array_index (common->src, j);
 
         if (stream->uid == tgt) {
-          if (stream->pending_tags == NULL)
-            stream->pending_tags = gst_tag_list_new_empty ();
-
-          gst_tag_list_insert (stream->pending_tags, taglist,
-              GST_TAG_MERGE_REPLACE);
+          gst_tag_list_insert (stream->tags, taglist, GST_TAG_MERGE_REPLACE);
+          stream->tags_changed = TRUE;
           found = TRUE;
         }
       }
       if (!found) {
-        GST_WARNING_OBJECT (common->sinkpad,
+        GST_FIXME_OBJECT (common->sinkpad,
             "Found track-specific tag(s), but track %" G_GUINT64_FORMAT
             " is not known (yet?)", tgt);
       }
@@ -2923,6 +2917,7 @@ gst_matroska_read_common_reset (GstElement * element,
   ctx->chapters_parsed = FALSE;
 
   /* tags */
+  ctx->global_tags_changed = FALSE;
   g_list_foreach (ctx->tags_parsed,
       (GFunc) gst_matroska_read_common_free_parsed_el, NULL);
   g_list_free (ctx->tags_parsed);
diff --git a/gst/matroska/matroska-read-common.h b/gst/matroska/matroska-read-common.h
index de2102689d3653d7d5e86283bb7ba6303e2187c9..3be95420894a97d62658db1d89db4f8466e4299b 100644
--- a/gst/matroska/matroska-read-common.h
+++ b/gst/matroska/matroska-read-common.h
@@ -90,6 +90,7 @@ typedef struct _GstMatroskaReadCommon {
   GstSegment               segment;
 
   GstTagList              *global_tags;
+  gboolean                 global_tags_changed;
 
   /* pull mode caching */
   GstBuffer *cached_buffer;
diff --git a/gst/monoscope/Makefile.am b/gst/monoscope/Makefile.am
index aac7b666c8bff309e8629a7857ffa60414446e01..36d2ed6d25114829e0922e0209aa0eb472125412 100644
--- a/gst/monoscope/Makefile.am
+++ b/gst/monoscope/Makefile.am
@@ -8,17 +8,3 @@ libgstmonoscope_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_
 libgstmonoscope_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
 libgstmonoscope_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstmonoscope_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmonoscope -:SHARED libgstmonoscope \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmonoscope_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmonoscope_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmonoscope_la_LDFLAGS) \
-	           $(libgstmonoscope_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/monoscope/Makefile.in b/gst/monoscope/Makefile.in
index 57760fc5a83f3ff162d29fbc5d4bba7a23d8f79b..098ce20ed1aea32119b666c1ddcdb30980d0ee5d 100644
--- a/gst/monoscope/Makefile.in
+++ b/gst/monoscope/Makefile.in
@@ -899,20 +899,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmonoscope -:SHARED libgstmonoscope \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmonoscope_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmonoscope_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmonoscope_la_LDFLAGS) \
-	           $(libgstmonoscope_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/multifile/Makefile.am b/gst/multifile/Makefile.am
index d15bc1f49daf6457bf3de24daae290a388292b7a..f7aa42a2a7233b027dd90e2d3ccc0cb2391608f3 100644
--- a/gst/multifile/Makefile.am
+++ b/gst/multifile/Makefile.am
@@ -30,17 +30,3 @@ test_splitmux_part_reader_SOURCES = \
 test_splitmux_part_reader_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GIO_CFLAGS)
 test_splitmux_part_reader_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_API_VERSION@ $(GST_BASE_LIBS) $(GST_LIBS) $(GIO_LIBS)
 test_splitmux_part_reader_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmultifile -:SHARED libgstmultifile \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmultifile_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmultifile_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmultifile_la_LDFLAGS) \
-	           $(libgstmultifile_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/multifile/Makefile.in b/gst/multifile/Makefile.in
index 050e09d87b10780d8a8a7f6bb383e9bd26dfd216..7289eec8279bc3a556416d9797bb88878997c67b 100644
--- a/gst/multifile/Makefile.in
+++ b/gst/multifile/Makefile.in
@@ -1086,20 +1086,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-am uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmultifile -:SHARED libgstmultifile \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmultifile_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmultifile_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmultifile_la_LDFLAGS) \
-	           $(libgstmultifile_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/multifile/gstmultifilesink.c b/gst/multifile/gstmultifilesink.c
index 85d1cd3a621ec522129c5d79d92a99a33a27e822..c035f55c9c450c59996abe96c7b63cdcd3fb6eab 100644
--- a/gst/multifile/gstmultifilesink.c
+++ b/gst/multifile/gstmultifilesink.c
@@ -28,6 +28,14 @@
  *
  * Write incoming data to a series of sequentially-named files.
  *
+ * This element is usually used with data where each buffer is an
+ * independent unit of data in its own right (e.g. raw video buffers or
+ * encoded JPEG or PNG images) or with streamable container formats such
+ * as MPEG-TS or MPEG-PS.
+ *
+ * It is not possible to use this element to create independently playable
+ * mp4 files, use the splitmuxsink element for that instead.
+ *
  * The filename property should contain a string with a \%d placeholder that will
  * be substituted with the index for each filename.
  *
@@ -136,8 +144,7 @@ enum
   PROP_POST_MESSAGES,
   PROP_NEXT_FILE,
   PROP_MAX_FILES,
-  PROP_MAX_FILE_SIZE,
-  PROP_LAST
+  PROP_MAX_FILE_SIZE
 };
 
 static void gst_multi_file_sink_finalize (GObject * object);
@@ -434,6 +441,30 @@ gst_multi_file_sink_post_message_full (GstMultiFileSink * multifilesink,
       gst_message_new_element (GST_OBJECT_CAST (multifilesink), s));
 }
 
+static void
+gst_multi_file_sink_post_message_from_time (GstMultiFileSink * multifilesink,
+    GstClockTime timestamp, GstClockTime duration, const char *filename)
+{
+  GstClockTime running_time, stream_time;
+  guint64 offset, offset_end;
+  GstSegment *segment;
+  GstFormat format;
+
+  if (!multifilesink->post_messages)
+    return;
+
+  segment = &GST_BASE_SINK (multifilesink)->segment;
+  format = segment->format;
+
+  offset = -1;
+  offset_end = -1;
+
+  running_time = gst_segment_to_running_time (segment, format, timestamp);
+  stream_time = gst_segment_to_stream_time (segment, format, timestamp);
+
+  gst_multi_file_sink_post_message_full (multifilesink, timestamp, duration,
+      offset, offset_end, running_time, stream_time, filename);
+}
 
 static void
 gst_multi_file_sink_post_message (GstMultiFileSink * multifilesink,
@@ -810,13 +841,12 @@ gst_multi_file_sink_event (GstBaseSink * sink, GstEvent * event)
         offset = offset_end = -1;
         filename = g_strdup_printf (multifilesink->filename,
             multifilesink->index);
-        gst_multi_file_sink_post_message_full (multifilesink, timestamp,
-            duration, offset, offset_end, running_time, stream_time, filename);
-
-        g_free (filename);
 
         gst_multi_file_sink_close_file (multifilesink, NULL);
 
+        gst_multi_file_sink_post_message_full (multifilesink, timestamp,
+            duration, offset, offset_end, running_time, stream_time, filename);
+        g_free (filename);
       }
 
       if (multifilesink->file == NULL) {
@@ -826,6 +856,20 @@ gst_multi_file_sink_event (GstBaseSink * sink, GstEvent * event)
 
       break;
     }
+    case GST_EVENT_EOS:
+      if (multifilesink->file) {
+        gchar *filename;
+
+        filename = g_strdup_printf (multifilesink->filename,
+            multifilesink->index);
+
+        gst_multi_file_sink_close_file (multifilesink, NULL);
+
+        gst_multi_file_sink_post_message_from_time (multifilesink,
+            GST_BASE_SINK (multifilesink)->segment.position, -1, filename);
+        g_free (filename);
+      }
+      break;
     default:
       break;
   }
diff --git a/gst/multifile/gstmultifilesrc.c b/gst/multifile/gstmultifilesrc.c
index c1c1cf1c45b9a41e3f235a9c0cb236375d2e2ceb..01dae987a71bbc15b2566a5fd93191193e38d6f3 100644
--- a/gst/multifile/gstmultifilesrc.c
+++ b/gst/multifile/gstmultifilesrc.c
@@ -72,13 +72,13 @@ GST_DEBUG_CATEGORY_STATIC (gst_multi_file_src_debug);
 
 enum
 {
-  ARG_0,
-  ARG_LOCATION,
-  ARG_INDEX,
-  ARG_START_INDEX,
-  ARG_STOP_INDEX,
-  ARG_CAPS,
-  ARG_LOOP
+  PROP_0,
+  PROP_LOCATION,
+  PROP_INDEX,
+  PROP_START_INDEX,
+  PROP_STOP_INDEX,
+  PROP_CAPS,
+  PROP_LOOP
 };
 
 #define DEFAULT_LOCATION "%05d"
@@ -143,35 +143,35 @@ gst_multi_file_src_class_init (GstMultiFileSrcClass * klass)
   gobject_class->set_property = gst_multi_file_src_set_property;
   gobject_class->get_property = gst_multi_file_src_get_property;
 
-  g_object_class_install_property (gobject_class, ARG_LOCATION,
+  g_object_class_install_property (gobject_class, PROP_LOCATION,
       g_param_spec_string ("location", "File Location",
           "Pattern to create file names of input files.  File names are "
           "created by calling sprintf() with the pattern and the current "
           "index.", DEFAULT_LOCATION,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_INDEX,
+  g_object_class_install_property (gobject_class, PROP_INDEX,
       g_param_spec_int ("index", "File Index",
           "Index to use with location property to create file names.  The "
           "index is incremented by one for each buffer read.",
           0, INT_MAX, DEFAULT_INDEX,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_START_INDEX,
+  g_object_class_install_property (gobject_class, PROP_START_INDEX,
       g_param_spec_int ("start-index", "Start Index",
           "Start value of index.  The initial value of index can be set "
           "either by setting index or start-index.  When the end of the loop "
           "is reached, the index will be set to the value start-index.",
           0, INT_MAX, DEFAULT_INDEX,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_STOP_INDEX,
+  g_object_class_install_property (gobject_class, PROP_STOP_INDEX,
       g_param_spec_int ("stop-index", "Stop Index",
           "Stop value of index.  The special value -1 means no stop.",
           -1, INT_MAX, DEFAULT_INDEX,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_CAPS,
+  g_object_class_install_property (gobject_class, PROP_CAPS,
       g_param_spec_boxed ("caps", "Caps",
           "Caps describing the format of the data.",
           GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_LOOP,
+  g_object_class_install_property (gobject_class, PROP_LOOP,
       g_param_spec_boolean ("loop", "Loop",
           "Whether to repeat from the beginning when all files have been read.",
           FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
@@ -295,19 +295,19 @@ gst_multi_file_src_set_property (GObject * object, guint prop_id,
   GstMultiFileSrc *src = GST_MULTI_FILE_SRC (object);
 
   switch (prop_id) {
-    case ARG_LOCATION:
+    case PROP_LOCATION:
       gst_multi_file_src_set_location (src, g_value_get_string (value));
       break;
-    case ARG_INDEX:
+    case PROP_INDEX:
       src->index = g_value_get_int (value);
       break;
-    case ARG_START_INDEX:
+    case PROP_START_INDEX:
       src->start_index = g_value_get_int (value);
       break;
-    case ARG_STOP_INDEX:
+    case PROP_STOP_INDEX:
       src->stop_index = g_value_get_int (value);
       break;
-    case ARG_CAPS:
+    case PROP_CAPS:
     {
       GstStructure *st = NULL;
       const GstCaps *caps = gst_value_get_caps (value);
@@ -333,7 +333,7 @@ gst_multi_file_src_set_property (GObject * object, guint prop_id,
       }
     }
       break;
-    case ARG_LOOP:
+    case PROP_LOOP:
       src->loop = g_value_get_boolean (value);
       break;
     default:
@@ -349,22 +349,22 @@ gst_multi_file_src_get_property (GObject * object, guint prop_id,
   GstMultiFileSrc *src = GST_MULTI_FILE_SRC (object);
 
   switch (prop_id) {
-    case ARG_LOCATION:
+    case PROP_LOCATION:
       g_value_set_string (value, src->filename);
       break;
-    case ARG_INDEX:
+    case PROP_INDEX:
       g_value_set_int (value, src->index);
       break;
-    case ARG_START_INDEX:
+    case PROP_START_INDEX:
       g_value_set_int (value, src->start_index);
       break;
-    case ARG_STOP_INDEX:
+    case PROP_STOP_INDEX:
       g_value_set_int (value, src->stop_index);
       break;
-    case ARG_CAPS:
+    case PROP_CAPS:
       gst_value_set_caps (value, src->caps);
       break;
-    case ARG_LOOP:
+    case PROP_LOOP:
       g_value_set_boolean (value, src->loop);
       break;
     default:
diff --git a/gst/multifile/gstsplitmuxsink.c b/gst/multifile/gstsplitmuxsink.c
index 3c3b3c250dfe1933405de7446f6697f533959a43..96f4d1d7053782f1dbd8fdfa5462105c4cba9a2c 100644
--- a/gst/multifile/gstsplitmuxsink.c
+++ b/gst/multifile/gstsplitmuxsink.c
@@ -248,6 +248,7 @@ gst_splitmux_sink_finalize (GObject * object)
 {
   GstSplitMuxSink *splitmux = GST_SPLITMUX_SINK (object);
   g_cond_clear (&splitmux->data_cond);
+  g_mutex_clear (&splitmux->lock);
   if (splitmux->provided_sink)
     gst_object_unref (splitmux->provided_sink);
   if (splitmux->provided_muxer)
@@ -1176,7 +1177,7 @@ gst_splitmux_sink_request_new_pad (GstElement * element,
 
   mq_stream_ctx_ref (ctx);
   ctx->sink_pad_block_id =
-      gst_pad_add_probe (res, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
+      gst_pad_add_probe (mq_sink, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
       (GstPadProbeCallback) handle_mq_input, ctx, (GDestroyNotify)
       _pad_block_destroy_sink_notify);
 
@@ -1294,7 +1295,7 @@ create_elements (GstSplitMuxSink * splitmux)
               create_element (splitmux, "mp4mux", "muxer")) == NULL)
         goto fail;
     } else {
-      if (!gst_bin_add (GST_BIN (splitmux), splitmux->provided_muxer)) {
+      if (!gst_bin_add (GST_BIN (splitmux), provided_muxer)) {
         g_warning ("Could not add muxer element - splitmuxsink will not work");
         gst_object_unref (provided_muxer);
         goto fail;
diff --git a/gst/multifile/gstsplitmuxsrc.c b/gst/multifile/gstsplitmuxsrc.c
index ea3ea7579d465037998764191cccc9069dcf1dba..9e310c1092af9405bedfbe97b6f9d46c709695b2 100644
--- a/gst/multifile/gstsplitmuxsrc.c
+++ b/gst/multifile/gstsplitmuxsrc.c
@@ -557,8 +557,8 @@ gst_splitmux_pad_loop (GstPad * pad)
 
 error:
   /* Fall through */
-  GST_ELEMENT_ERROR (splitmux, RESOURCE, OPEN_READ,
-      ("Error reading part file %s", GST_STR_NULL (reader->path)), (NULL));
+  GST_ELEMENT_ERROR (splitmux, RESOURCE, OPEN_READ, (NULL),
+      ("Error reading part file %s", GST_STR_NULL (reader->path)));
 flushing:
   gst_pad_pause_task (pad);
   gst_object_unref (splitmux);
diff --git a/gst/multipart/Makefile.am b/gst/multipart/Makefile.am
index 124c67f0793ff699d15a23036e1b9216a4c09f6b..5ab670e5c8172865a20533eb64bf4dad7205d94b 100644
--- a/gst/multipart/Makefile.am
+++ b/gst/multipart/Makefile.am
@@ -7,18 +7,3 @@ libgstmultipart_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstmultipart_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = multipartdemux.h multipartmux.h
-
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmultipart -:SHARED libgstmultipart \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmultipart_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmultipart_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmultipart_la_LDFLAGS) \
-	           $(libgstmultipart_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/multipart/Makefile.in b/gst/multipart/Makefile.in
index d951ad799e6cc266de3fd63e44680b91413b7ec7..e46539ad65daa94167a9e01e586236fd01093e13 100644
--- a/gst/multipart/Makefile.in
+++ b/gst/multipart/Makefile.in
@@ -900,20 +900,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstmultipart -:SHARED libgstmultipart \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstmultipart_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstmultipart_la_CFLAGS) \
-	 -:LDFLAGS $(libgstmultipart_la_LDFLAGS) \
-	           $(libgstmultipart_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/multipart/multipartmux.c b/gst/multipart/multipartmux.c
index 681429387e5af8ec319d07f35a6cfdadde40a7c3..2ac67c109a00fabbf1e296d14aa1d8f81cce6e61 100644
--- a/gst/multipart/multipartmux.c
+++ b/gst/multipart/multipartmux.c
@@ -47,8 +47,8 @@ GST_DEBUG_CATEGORY_STATIC (gst_multipart_mux_debug);
 
 enum
 {
-  ARG_0,
-  ARG_BOUNDARY
+  PROP_0,
+  PROP_BOUNDARY
       /* FILL ME */
 };
 
@@ -114,7 +114,7 @@ gst_multipart_mux_class_init (GstMultipartMuxClass * klass)
   gobject_class->get_property = gst_multipart_mux_get_property;
   gobject_class->set_property = gst_multipart_mux_set_property;
 
-  g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BOUNDARY,
+  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BOUNDARY,
       g_param_spec_string ("boundary", "Boundary", "Boundary string",
           DEFAULT_BOUNDARY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
@@ -153,8 +153,8 @@ gst_multipart_mux_init (GstMultipartMux * multipart_mux)
 
   multipart_mux->collect = gst_collect_pads_new ();
   gst_collect_pads_set_event_function (multipart_mux->collect,
-      (GstCollectPadsEventFunction) GST_DEBUG_FUNCPTR (gst_multipart_mux_sink_event),
-      multipart_mux);
+      (GstCollectPadsEventFunction)
+      GST_DEBUG_FUNCPTR (gst_multipart_mux_sink_event), multipart_mux);
   gst_collect_pads_set_function (multipart_mux->collect,
       (GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_multipart_mux_collected),
       multipart_mux);
@@ -600,7 +600,7 @@ gst_multipart_mux_get_property (GObject * object,
   mux = GST_MULTIPART_MUX (object);
 
   switch (prop_id) {
-    case ARG_BOUNDARY:
+    case PROP_BOUNDARY:
       g_value_set_string (value, mux->boundary);
       break;
     default:
@@ -618,7 +618,7 @@ gst_multipart_mux_set_property (GObject * object,
   mux = GST_MULTIPART_MUX (object);
 
   switch (prop_id) {
-    case ARG_BOUNDARY:
+    case PROP_BOUNDARY:
       g_free (mux->boundary);
       mux->boundary = g_strdup (g_value_get_string (value));
       break;
diff --git a/gst/replaygain/Makefile.am b/gst/replaygain/Makefile.am
index d352f18d2cadcc3c1882fd202c223fc31238ddea..87f64c32c6cd6b2d8d7ffa495d0426d20d3af7f9 100644
--- a/gst/replaygain/Makefile.am
+++ b/gst/replaygain/Makefile.am
@@ -21,18 +21,3 @@ noinst_HEADERS =         \
 	gstrgvolume.h    \
 	replaygain.h     \
 	rganalysis.h
-
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstreplaygain -:SHARED libgstreplaygain \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstreplaygain_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstreplaygain_la_CFLAGS) \
-	 -:LDFLAGS $(libgstreplaygain_la_LDFLAGS) \
-	           $(libgstreplaygain_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/replaygain/Makefile.in b/gst/replaygain/Makefile.in
index 947f1b92b74b4d5dc9ca8b28b1009eaee1486af7..a0712664d2a07022fc74fd759d0b09efa8d08d82 100644
--- a/gst/replaygain/Makefile.in
+++ b/gst/replaygain/Makefile.in
@@ -938,20 +938,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstreplaygain -:SHARED libgstreplaygain \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstreplaygain_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstreplaygain_la_CFLAGS) \
-	 -:LDFLAGS $(libgstreplaygain_la_LDFLAGS) \
-	           $(libgstreplaygain_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/rtp/Makefile.am b/gst/rtp/Makefile.am
index b4a621b172a44d052500713c92c302d053874bbc..441c52fbd4cfb535cbaf5c32cdc83f24b4973149 100644
--- a/gst/rtp/Makefile.am
+++ b/gst/rtp/Makefile.am
@@ -180,17 +180,3 @@ noinst_HEADERS =			\
 	gstrtpstreamdepay.h
 
 EXTRA_DIST = dboolhuff.LICENSE
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstrtp -:SHARED libgstrtp \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstrtp_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrtp_la_CFLAGS) \
-	 -:LDFLAGS $(libgstrtp_la_LDFLAGS) \
-	  $(libgstrtp_la_LIBADD) \
-	  -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	      LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/rtp/Makefile.in b/gst/rtp/Makefile.in
index 931b9ac01f2ed57b18c3a4ac1aa8464d6e2cb64a..06bc305580153810f0ce11642b6a1ccaa2afb021 100644
--- a/gst/rtp/Makefile.in
+++ b/gst/rtp/Makefile.in
@@ -1734,20 +1734,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstrtp -:SHARED libgstrtp \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstrtp_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrtp_la_CFLAGS) \
-	 -:LDFLAGS $(libgstrtp_la_LDFLAGS) \
-	  $(libgstrtp_la_LIBADD) \
-	  -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	      LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/rtp/gstrtpL16depay.c b/gst/rtp/gstrtpL16depay.c
index 5bbbedc1876d8a82b1c801f661b041879152809d..667a64a6ce2b3bdcaa95b7bde086d86b55c2625a 100644
--- a/gst/rtp/gstrtpL16depay.c
+++ b/gst/rtp/gstrtpL16depay.c
@@ -27,7 +27,7 @@
  * <refsect2>
  * <title>Example pipeline</title>
  * |[
- * gst-launch udpsrc caps='application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1, payload=(int)96' ! rtpL16depay ! pulsesink
+ * gst-launch-1.0 udpsrc caps='application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1, payload=(int)96' ! rtpL16depay ! pulsesink
  * ]| This example pipeline will depayload an RTP raw audio stream. Refer to
  * the rtpL16pay example to create the RTP stream.
  * </refsect2>
diff --git a/gst/rtp/gstrtpL16pay.c b/gst/rtp/gstrtpL16pay.c
index 5d92c25e86bab16aec7ab1561d666965737267cf..a8ed36fd2e9c9c8698800b531ab13f2f0c124ca3 100644
--- a/gst/rtp/gstrtpL16pay.c
+++ b/gst/rtp/gstrtpL16pay.c
@@ -27,7 +27,7 @@
  * <refsect2>
  * <title>Example pipeline</title>
  * |[
- * gst-launch -v audiotestsrc ! audioconvert ! rtpL16pay ! udpsink
+ * gst-launch-1.0 -v audiotestsrc ! audioconvert ! rtpL16pay ! udpsink
  * ]| This example pipeline will payload raw audio. Refer to
  * the rtpL16depay example to depayload and play the RTP stream.
  * </refsect2>
diff --git a/gst/rtp/gstrtpL24depay.c b/gst/rtp/gstrtpL24depay.c
index 1925ce08226a1411a45ffa9abce94932a342bbc2..7b5ef0c8bcda010f07ef0f895a1c8a6497aa1aeb 100644
--- a/gst/rtp/gstrtpL24depay.c
+++ b/gst/rtp/gstrtpL24depay.c
@@ -27,7 +27,7 @@
  * <refsect2>
  * <title>Example pipeline</title>
  * |[
- * gst-launch udpsrc caps='application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L24, encoding-params=(string)1, channels=(int)1, payload=(int)96' ! rtpL24depay ! pulsesink
+ * gst-launch-1.0 udpsrc caps='application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L24, encoding-params=(string)1, channels=(int)1, payload=(int)96' ! rtpL24depay ! pulsesink
  * ]| This example pipeline will depayload an RTP raw audio stream. Refer to
  * the rtpL24pay example to create the RTP stream.
  * </refsect2>
diff --git a/gst/rtp/gstrtpL24pay.c b/gst/rtp/gstrtpL24pay.c
index d2612e9c3d2691a4abaa0b25c03786f34123ec23..1bb37cb3db022d00edd508322c38f31e443bf147 100644
--- a/gst/rtp/gstrtpL24pay.c
+++ b/gst/rtp/gstrtpL24pay.c
@@ -27,7 +27,7 @@
  * <refsect2>
  * <title>Example pipeline</title>
  * |[
- * gst-launch -v audiotestsrc ! audioconvert ! rtpL24pay ! udpsink
+ * gst-launch-1.0 -v audiotestsrc ! audioconvert ! rtpL24pay ! udpsink
  * ]| This example pipeline will payload raw audio. Refer to
  * the rtpL24depay example to depayload and play the RTP stream.
  * </refsect2>
diff --git a/gst/rtp/gstrtpac3pay.c b/gst/rtp/gstrtpac3pay.c
index a6ef9140a71e39278443b5342f5434740d40422b..e283afd0d81dfe31820d56fe85d7dc281e7bda4d 100644
--- a/gst/rtp/gstrtpac3pay.c
+++ b/gst/rtp/gstrtpac3pay.c
@@ -27,7 +27,7 @@
  * <refsect2>
  * <title>Example pipeline</title>
  * |[
- * gst-launch -v audiotestsrc ! avenc_ac3 ! rtpac3pay ! udpsink
+ * gst-launch-1.0 -v audiotestsrc ! avenc_ac3 ! rtpac3pay ! udpsink
  * ]| This example pipeline will encode and payload AC3 stream. Refer to
  * the rtpac3depay example to depayload and decode the RTP stream.
  * </refsect2>
diff --git a/gst/rtp/gstrtpamrdepay.c b/gst/rtp/gstrtpamrdepay.c
index 1156ac92528f31414067d510b892f1e7fcb19982..4b53843ae15d6ba1ea16b5c43ee11e695b1765cb 100644
--- a/gst/rtp/gstrtpamrdepay.c
+++ b/gst/rtp/gstrtpamrdepay.c
@@ -61,7 +61,7 @@ enum
 
 enum
 {
-  ARG_0
+  PROP_0
 };
 
 /* input is an RTP packet
@@ -74,8 +74,7 @@ static GstStaticPadTemplate gst_rtp_amr_depay_sink_template =
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("application/x-rtp, "
         "media = (string) \"audio\", "
-        "clock-rate = (int) 8000, "
-        "encoding-name = (string) \"AMR\", "
+        "clock-rate = (int) 8000, " "encoding-name = (string) \"AMR\", "
         /* This is the default, so the peer doesn't have to specify it
          * "encoding-params = (string) \"1\", " */
         /* NOTE that all values must be strings in orde to be able to do SDP <->
@@ -94,8 +93,7 @@ static GstStaticPadTemplate gst_rtp_amr_depay_sink_template =
          */
         "application/x-rtp, "
         "media = (string) \"audio\", "
-        "clock-rate = (int) 16000, "
-        "encoding-name = (string) \"AMR-WB\", "
+        "clock-rate = (int) 16000, " "encoding-name = (string) \"AMR-WB\", "
         /* This is the default, so the peer doesn't have to specify it
          * "encoding-params = (string) \"1\", " */
         /* NOTE that all values must be strings in orde to be able to do SDP <->
diff --git a/gst/rtp/gstrtpamrpay.c b/gst/rtp/gstrtpamrpay.c
index ed319cc0322b46aba43f1747319c1623496f52fe..ead9f94042ed31971097c23d3d50a1aeee6e4037 100644
--- a/gst/rtp/gstrtpamrpay.c
+++ b/gst/rtp/gstrtpamrpay.c
@@ -27,7 +27,7 @@
  * <refsect2>
  * <title>Example pipeline</title>
  * |[
- * gst-launch -v audiotestsrc ! amrnbenc ! rtpamrpay ! udpsink
+ * gst-launch-1.0 -v audiotestsrc ! amrnbenc ! rtpamrpay ! udpsink
  * ]| This example pipeline will encode and payload an AMR stream. Refer to
  * the rtpamrdepay example to depayload and decode the RTP stream.
  * </refsect2>
diff --git a/gst/rtp/gstrtpceltdepay.c b/gst/rtp/gstrtpceltdepay.c
index 7203f10ebeb53d1acf197c0ee68dc94a8e63ddc4..5e15cc6fa8cc4c5c585500a47f9e0dd652581444 100644
--- a/gst/rtp/gstrtpceltdepay.c
+++ b/gst/rtp/gstrtpceltdepay.c
@@ -44,7 +44,7 @@ enum
 
 enum
 {
-  ARG_0
+  PROP_0
 };
 
 static GstStaticPadTemplate gst_rtp_celt_depay_sink_template =
diff --git a/gst/rtp/gstrtpdvdepay.c b/gst/rtp/gstrtpdvdepay.c
index 7cb1ff41084f576aacc1c57195a20f2da4927f19..f13b696f475281f2108ed3e56b6ff81f874750dd 100644
--- a/gst/rtp/gstrtpdvdepay.c
+++ b/gst/rtp/gstrtpdvdepay.c
@@ -45,7 +45,7 @@ enum
 
 enum
 {
-  ARG_0,
+  PROP_0,
 };
 
 static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
diff --git a/gst/rtp/gstrtpg723depay.c b/gst/rtp/gstrtpg723depay.c
index b8226889b8231d80624c007b40ef2fd051a0381c..fb726f202f12ce935454b1ad8741176630341725 100644
--- a/gst/rtp/gstrtpg723depay.c
+++ b/gst/rtp/gstrtpg723depay.c
@@ -45,7 +45,7 @@ enum
 
 enum
 {
-  ARG_0
+  PROP_0
 };
 
 /* input is an RTP packet
diff --git a/gst/rtp/gstrtpg726depay.c b/gst/rtp/gstrtpg726depay.c
index 45d99dc835bbd3eb903cbae405b5432b28ee5bce..0b4a0418ab194a7c11221064a2293a20058afd83 100644
--- a/gst/rtp/gstrtpg726depay.c
+++ b/gst/rtp/gstrtpg726depay.c
@@ -50,8 +50,7 @@ enum
 enum
 {
   PROP_0,
-  PROP_FORCE_AAL2,
-  PROP_LAST
+  PROP_FORCE_AAL2
 };
 
 static GstStaticPadTemplate gst_rtp_g726_depay_sink_template =
diff --git a/gst/rtp/gstrtpg726pay.c b/gst/rtp/gstrtpg726pay.c
index a1c8f5d958cbf18672fc3db785fcea165bd47661..da9fe25f34d213da9a5d14daff7604e32357a91e 100644
--- a/gst/rtp/gstrtpg726pay.c
+++ b/gst/rtp/gstrtpg726pay.c
@@ -38,8 +38,7 @@ GST_DEBUG_CATEGORY_STATIC (rtpg726pay_debug);
 enum
 {
   PROP_0,
-  PROP_FORCE_AAL2,
-  PROP_LAST
+  PROP_FORCE_AAL2
 };
 
 static GstStaticPadTemplate gst_rtp_g726_pay_sink_template =
diff --git a/gst/rtp/gstrtpg729depay.c b/gst/rtp/gstrtpg729depay.c
index f763e4cd83b9f55e50a3c0d0f7c01ba92f3ba9dd..9910add1a98bd0ace1b252e14f47995517c13a26 100644
--- a/gst/rtp/gstrtpg729depay.c
+++ b/gst/rtp/gstrtpg729depay.c
@@ -43,7 +43,7 @@ enum
 
 enum
 {
-  ARG_0
+  PROP_0
 };
 
 /* input is an RTP packet
diff --git a/gst/rtp/gstrtpgstpay.c b/gst/rtp/gstrtpgstpay.c
index 08794d1c14b4a65601fbdd72a0798f3bb4766036..61670088ce5ab0e3c579d64cc2f2d45295f438b1 100644
--- a/gst/rtp/gstrtpgstpay.c
+++ b/gst/rtp/gstrtpgstpay.c
@@ -76,8 +76,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
 enum
 {
   PROP_0,
-  PROP_CONFIG_INTERVAL,
-  PROP_LAST
+  PROP_CONFIG_INTERVAL
 };
 
 #define DEFAULT_CONFIG_INTERVAL		      0
diff --git a/gst/rtp/gstrtph263depay.c b/gst/rtp/gstrtph263depay.c
index 83e901288a87e95c82bd9a9545d004d376b886a6..a63b0b13a3b57f81ede182ed50fced7f15a5e130 100644
--- a/gst/rtp/gstrtph263depay.c
+++ b/gst/rtp/gstrtph263depay.c
@@ -55,9 +55,16 @@ static GstStaticPadTemplate gst_rtp_h263_depay_sink_template =
         "media = (string) \"video\", "
         "payload = (int) " GST_RTP_PAYLOAD_H263_STRING ", "
         "clock-rate = (int) 90000; "
+        /* optional SDP attribute:
+         * "a-framesize = (string) \"1234-1234\", "
+         */
         "application/x-rtp, "
         "media = (string) \"video\", "
-        "clock-rate = (int) 90000, " "encoding-name = (string) \"H263\"")
+        "clock-rate = (int) 90000, " "encoding-name = (string) \"H263\""
+        /* optional SDP attribute:
+         * "a-framesize = (string) \"1234-1234\", "
+         */
+    )
     );
 
 #define gst_rtp_h263_depay_parent_class parent_class
@@ -129,20 +136,67 @@ gst_rtp_h263_depay_finalize (GObject * object)
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
+static gboolean
+gst_rtp_h263_parse_framesize (GstRTPBaseDepayload * filter,
+    const gchar * media_attr, GstCaps * srccaps)
+{
+  gchar *dimension, *endptr;
+  gint width, height;
+  GstStructure *d;
+
+  width = g_ascii_strtoull (media_attr, &endptr, 10);
+  if (width <= 0) {
+    GST_ERROR_OBJECT (filter,
+        "Framesize media attribute width out of valid range");
+    return FALSE;
+  } else if (*endptr != '-') {
+    GST_ERROR_OBJECT (filter,
+        "Framesize media attribute has invalid dimension separator");
+    return FALSE;
+  }
+
+  dimension = endptr + 1;
+  height = g_ascii_strtoull (dimension, &endptr, 10);
+  if (height <= 0) {
+    GST_ERROR_OBJECT (filter,
+        "Framesize media attribute height out of valid range");
+    return FALSE;
+  } else if (*endptr != '\0') {
+    GST_ERROR_OBJECT (filter,
+        "Framesize media attribute unexpectedly has trailing characters");
+    return FALSE;
+  }
+
+  d = gst_caps_get_structure (srccaps, 0);
+  gst_structure_set (d, "width", G_TYPE_INT, width, "height", G_TYPE_INT,
+      height, NULL);
+
+  return TRUE;
+}
+
 gboolean
 gst_rtp_h263_depay_setcaps (GstRTPBaseDepayload * filter, GstCaps * caps)
 {
   GstCaps *srccaps;
   GstStructure *structure = gst_caps_get_structure (caps, 0);
   gint clock_rate;
+  const gchar *framesize;
+
+  srccaps = gst_caps_new_simple ("video/x-h263",
+      "variant", G_TYPE_STRING, "itu",
+      "h263version", G_TYPE_STRING, "h263", NULL);
 
   if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
     clock_rate = 90000;         /* default */
   filter->clock_rate = clock_rate;
 
-  srccaps = gst_caps_new_simple ("video/x-h263",
-      "variant", G_TYPE_STRING, "itu",
-      "h263version", G_TYPE_STRING, "h263", NULL);
+  framesize = gst_structure_get_string (structure, "a-framesize");
+  if (framesize != NULL) {
+    if (!gst_rtp_h263_parse_framesize (filter, framesize, srccaps)) {
+      return FALSE;
+    }
+  }
+
   gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (filter), srccaps);
   gst_caps_unref (srccaps);
 
diff --git a/gst/rtp/gstrtph263pay.c b/gst/rtp/gstrtph263pay.c
index c664c5b9b11a2dc9fd1840f6d5e44ab89c37452e..0b7d24ea1837e91a15f91769741241461f03f417 100644
--- a/gst/rtp/gstrtph263pay.c
+++ b/gst/rtp/gstrtph263pay.c
@@ -461,13 +461,43 @@ gst_rtp_h263_pay_finalize (GObject * object)
 static gboolean
 gst_rtp_h263_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
 {
+  GstStructure *s = gst_caps_get_structure (caps, 0);
+  gint width, height;
+  gchar *framesize = NULL;
   gboolean res;
 
+  if (gst_structure_has_field (s, "width") &&
+      gst_structure_has_field (s, "height")) {
+    if (!gst_structure_get_int (s, "width", &width) || width <= 0) {
+      goto invalid_dimension;
+    }
+
+    if (!gst_structure_get_int (s, "height", &height) || height <= 0) {
+      goto invalid_dimension;
+    }
+
+    framesize = g_strdup_printf ("%d-%d", width, height);
+  }
+
   payload->pt = GST_RTP_PAYLOAD_H263;
   gst_rtp_base_payload_set_options (payload, "video", TRUE, "H263", 90000);
-  res = gst_rtp_base_payload_set_outcaps (payload, NULL);
+
+  if (framesize != NULL) {
+    res = gst_rtp_base_payload_set_outcaps (payload,
+        "a-framesize", G_TYPE_STRING, framesize, NULL);
+  } else {
+    res = gst_rtp_base_payload_set_outcaps (payload, NULL);
+  }
+  g_free (framesize);
 
   return res;
+
+  /* ERRORS */
+invalid_dimension:
+  {
+    GST_ERROR_OBJECT (payload, "Invalid width/height from caps");
+    return FALSE;
+  }
 }
 
 static void
diff --git a/gst/rtp/gstrtph264pay.c b/gst/rtp/gstrtph264pay.c
index ba5e4b3401c6f46034c81481703ade339e4469d1..665814acb4b105695be8cc877e8baa594fda2fb7 100644
--- a/gst/rtp/gstrtph264pay.c
+++ b/gst/rtp/gstrtph264pay.c
@@ -72,8 +72,7 @@ enum
 {
   PROP_0,
   PROP_SPROP_PARAMETER_SETS,
-  PROP_CONFIG_INTERVAL,
-  PROP_LAST
+  PROP_CONFIG_INTERVAL
 };
 
 #define IS_ACCESS_UNIT(x) (((x) > 0x00) && ((x) < 0x06))
diff --git a/gst/rtp/gstrtpjpegdepay.c b/gst/rtp/gstrtpjpegdepay.c
index 5463283e797408a400abe34e354851d5a16f8f99..57055e863f3448d47a6b2256c7050ae6d78bc56b 100644
--- a/gst/rtp/gstrtpjpegdepay.c
+++ b/gst/rtp/gstrtpjpegdepay.c
@@ -50,7 +50,6 @@ static GstStaticPadTemplate gst_rtp_jpeg_depay_sink_template =
         /*
          * "a-framerate = (string) 0.00, "
          * "x-framerate = (string) 0.00, "
-         * "a-framesize = (string) 1234-1234, "
          * "x-dimensions = (string) \"1234,1234\", "
          */
         "application/x-rtp, "
@@ -61,7 +60,6 @@ static GstStaticPadTemplate gst_rtp_jpeg_depay_sink_template =
         /*
          * "a-framerate = (string) 0.00, "
          * "x-framerate = (string) 0.00, "
-         * "a-framesize = (string) 1234-1234, "
          * "x-dimensions = (string) \"1234,1234\""
          */
     )
@@ -458,15 +456,6 @@ gst_rtp_jpeg_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
     }
   }
 
-  if ((media_attr = gst_structure_get_string (structure, "a-framesize"))) {
-    gint w, h;
-
-    if (sscanf (media_attr, "%d-%d", &w, &h) == 2) {
-      rtpjpegdepay->media_width = w;
-      rtpjpegdepay->media_height = h;
-    }
-  }
-
   /* try to get a framerate */
   media_attr = gst_structure_get_string (structure, "a-framerate");
   if (!media_attr)
diff --git a/gst/rtp/gstrtpjpegpay.c b/gst/rtp/gstrtpjpegpay.c
index 3e820a0889d21a66888f6c7c40dcb3d4b01c40e6..bf4ed555aefcf1911c5387b84c443e416cd42177 100644
--- a/gst/rtp/gstrtpjpegpay.c
+++ b/gst/rtp/gstrtpjpegpay.c
@@ -114,8 +114,7 @@ enum
 {
   PROP_0,
   PROP_JPEG_QUALITY,
-  PROP_JPEG_TYPE,
-  PROP_LAST
+  PROP_JPEG_TYPE
 };
 
 enum
@@ -296,7 +295,6 @@ gst_rtp_jpeg_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
   gint num = 0, denom;
   gchar *rate = NULL;
   gchar *dim = NULL;
-  gchar *size;
 
   pay = GST_RTP_JPEG_PAY (basepayload);
 
@@ -331,8 +329,6 @@ gst_rtp_jpeg_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
     rate = g_strdup_printf ("%f", framerate);
   }
 
-  size = g_strdup_printf ("%d-%d", width, height);
-
   if (pay->width == 0) {
     GST_DEBUG_OBJECT (pay,
         "width or height are greater than 2040, adding x-dimensions to caps");
@@ -341,24 +337,21 @@ gst_rtp_jpeg_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
 
   if (rate != NULL && dim != NULL) {
     res = gst_rtp_base_payload_set_outcaps (basepayload, "a-framerate",
-        G_TYPE_STRING, rate, "a-framesize", G_TYPE_STRING, size,
-        "x-dimensions", G_TYPE_STRING, dim, NULL);
+        G_TYPE_STRING, rate, "x-dimensions", G_TYPE_STRING, dim, NULL);
   } else if (rate != NULL && dim == NULL) {
     res = gst_rtp_base_payload_set_outcaps (basepayload, "a-framerate",
-        G_TYPE_STRING, rate, "a-framesize", G_TYPE_STRING, size, NULL);
+        G_TYPE_STRING, rate, NULL);
   } else if (rate == NULL && dim != NULL) {
     res = gst_rtp_base_payload_set_outcaps (basepayload, "x-dimensions",
-        G_TYPE_STRING, dim, "a-framesize", G_TYPE_STRING, size, NULL);
+        G_TYPE_STRING, dim, NULL);
   } else {
-    res = gst_rtp_base_payload_set_outcaps (basepayload, "a-framesize",
-        G_TYPE_STRING, size, NULL);
+    res = gst_rtp_base_payload_set_outcaps (basepayload, NULL);
   }
 
   if (dim != NULL)
     g_free (dim);
   if (rate != NULL)
     g_free (rate);
-  g_free (size);
 
   return res;
 
diff --git a/gst/rtp/gstrtpmp4vpay.c b/gst/rtp/gstrtpmp4vpay.c
index 56cf9f733c24693fafa0b43f2733e9beeb41ee49..1ed1ac54bf8949fa32d94cc2f21e4d25aafb4be2 100644
--- a/gst/rtp/gstrtpmp4vpay.c
+++ b/gst/rtp/gstrtpmp4vpay.c
@@ -58,8 +58,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
 
 enum
 {
-  ARG_0,
-  ARG_CONFIG_INTERVAL
+  PROP_0,
+  PROP_CONFIG_INTERVAL
 };
 
 
@@ -103,7 +103,7 @@ G_DEFINE_TYPE (GstRtpMP4VPay, gst_rtp_mp4v_pay, GST_TYPE_RTP_BASE_PAYLOAD)
       "Payload MPEG-4 video as RTP packets (RFC 3016)",
       "Wim Taymans <wim.taymans@gmail.com>");
 
-  g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_CONFIG_INTERVAL,
+  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_CONFIG_INTERVAL,
       g_param_spec_uint ("config-interval", "Config Send Interval",
           "Send Config Insertion Interval in seconds (configuration headers "
           "will be multiplexed in the data stream when detected.) (0 = disabled)",
@@ -584,7 +584,7 @@ gst_rtp_mp4v_pay_set_property (GObject * object, guint prop_id,
   rtpmp4vpay = GST_RTP_MP4V_PAY (object);
 
   switch (prop_id) {
-    case ARG_CONFIG_INTERVAL:
+    case PROP_CONFIG_INTERVAL:
       rtpmp4vpay->config_interval = g_value_get_uint (value);
       break;
     default:
@@ -601,7 +601,7 @@ gst_rtp_mp4v_pay_get_property (GObject * object, guint prop_id,
   rtpmp4vpay = GST_RTP_MP4V_PAY (object);
 
   switch (prop_id) {
-    case ARG_CONFIG_INTERVAL:
+    case PROP_CONFIG_INTERVAL:
       g_value_set_uint (value, rtpmp4vpay->config_interval);
       break;
     default:
diff --git a/gst/rtp/gstrtppcmadepay.c b/gst/rtp/gstrtppcmadepay.c
index d4fb2afb7e14e6aee2b8dacdeec5288f1736c3e2..8f96250a0023c5f9dc982c36e1e01a67fabad9e0 100644
--- a/gst/rtp/gstrtppcmadepay.c
+++ b/gst/rtp/gstrtppcmadepay.c
@@ -36,7 +36,7 @@ enum
 
 enum
 {
-  ARG_0
+  PROP_0
 };
 
 static GstStaticPadTemplate gst_rtp_pcma_depay_sink_template =
diff --git a/gst/rtp/gstrtppcmudepay.c b/gst/rtp/gstrtppcmudepay.c
index 14367a10b0d8eb161625bab9e3135c943fee006b..e75c2822f28529c91627c6e202394611de1b0983 100644
--- a/gst/rtp/gstrtppcmudepay.c
+++ b/gst/rtp/gstrtppcmudepay.c
@@ -36,7 +36,7 @@ enum
 
 enum
 {
-  ARG_0
+  PROP_0
 };
 
 static GstStaticPadTemplate gst_rtp_pcmu_depay_sink_template =
diff --git a/gst/rtp/gstrtpqcelpdepay.c b/gst/rtp/gstrtpqcelpdepay.c
index b52451c82221616b02edf868b3bcd2ecafdc77bc..fc88f4a116a6276a916765c2ba582ea734489ebd 100644
--- a/gst/rtp/gstrtpqcelpdepay.c
+++ b/gst/rtp/gstrtpqcelpdepay.c
@@ -45,7 +45,7 @@ enum
 
 enum
 {
-  ARG_0
+  PROP_0
 };
 
 static GstStaticPadTemplate gst_rtp_qcelp_depay_sink_template =
diff --git a/gst/rtp/gstrtpspeexdepay.c b/gst/rtp/gstrtpspeexdepay.c
index 34aef390a39f20f973354c33d98cf7d510f2327d..efe7357ea4d9543e58c752ecd5e785a2de8bb625 100644
--- a/gst/rtp/gstrtpspeexdepay.c
+++ b/gst/rtp/gstrtpspeexdepay.c
@@ -36,7 +36,7 @@ enum
 
 enum
 {
-  ARG_0
+  PROP_0
 };
 
 static GstStaticPadTemplate gst_rtp_speex_depay_sink_template =
diff --git a/gst/rtp/gstrtpvp8depay.c b/gst/rtp/gstrtpvp8depay.c
index fed9779acb1d8ed92476c7058d3262048cf59594..cafdad5b869d6cd2df5fa309f0844613947499ce 100644
--- a/gst/rtp/gstrtpvp8depay.c
+++ b/gst/rtp/gstrtpvp8depay.c
@@ -24,14 +24,20 @@
 
 #include "gstrtpvp8depay.h"
 
+#include <gst/video/video.h>
+
+#include <stdio.h>
+
 GST_DEBUG_CATEGORY_STATIC (gst_rtp_vp8_depay_debug);
 #define GST_CAT_DEFAULT gst_rtp_vp8_depay_debug
 
 static void gst_rtp_vp8_depay_dispose (GObject * object);
 static GstBuffer *gst_rtp_vp8_depay_process (GstRTPBaseDepayload * depayload,
     GstBuffer * buf);
-static gboolean gst_rtp_vp8_depay_set_caps (GstRTPBaseDepayload * depayload,
-    GstCaps * caps);
+static GstStateChangeReturn gst_rtp_vp8_depay_change_state (GstElement *
+    element, GstStateChange transition);
+static gboolean gst_rtp_vp8_depay_handle_event (GstRTPBaseDepayload * depay,
+    GstEvent * event);
 
 G_DEFINE_TYPE (GstRtpVP8Depay, gst_rtp_vp8_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
 
@@ -78,8 +84,10 @@ gst_rtp_vp8_depay_class_init (GstRtpVP8DepayClass * gst_rtp_vp8_depay_class)
 
   object_class->dispose = gst_rtp_vp8_depay_dispose;
 
+  element_class->change_state = gst_rtp_vp8_depay_change_state;
+
   depay_class->process = gst_rtp_vp8_depay_process;
-  depay_class->set_caps = gst_rtp_vp8_depay_set_caps;
+  depay_class->handle_event = gst_rtp_vp8_depay_handle_event;
 
   GST_DEBUG_CATEGORY_INIT (gst_rtp_vp8_depay_debug, "rtpvp8depay", 0,
       "VP8 Video RTP Depayloader");
@@ -177,11 +185,53 @@ gst_rtp_vp8_depay_process (GstRTPBaseDepayload * depay, GstBuffer * buf)
 
     /* mark keyframes */
     out = gst_buffer_make_writable (out);
-    if ((flag0 & 0x01))
+    if ((flag0 & 0x01)) {
       GST_BUFFER_FLAG_SET (out, GST_BUFFER_FLAG_DELTA_UNIT);
-    else
+
+      if (!self->caps_sent) {
+        gst_buffer_unref (out);
+        out = NULL;
+        GST_INFO_OBJECT (self, "Dropping inter-frame before intra-frame");
+        gst_pad_push_event (GST_RTP_BASE_DEPAYLOAD_SINKPAD (depay),
+            gst_video_event_new_upstream_force_key_unit (GST_CLOCK_TIME_NONE,
+                TRUE, 0));
+      }
+    } else {
+      GstMapInfo info;
+
       GST_BUFFER_FLAG_UNSET (out, GST_BUFFER_FLAG_DELTA_UNIT);
 
+      if (gst_buffer_map (out, &info, GST_MAP_READ)) {
+        guint profile, width, height;
+
+        profile = (flag0 & 0x0e) >> 1;
+        width = GST_READ_UINT16_LE (info.data + 6) & 0x3fff;
+        height = GST_READ_UINT16_LE (info.data + 8) & 0x3fff;
+        gst_buffer_unmap (out, &info);
+
+        if (G_UNLIKELY (self->last_width != width ||
+                self->last_height != height || self->last_profile != profile)) {
+          gchar profile_str[3];
+          GstCaps *srccaps;
+
+          snprintf (profile_str, 3, "%u", profile);
+          srccaps = gst_caps_new_simple ("video/x-vp8",
+              "framerate", GST_TYPE_FRACTION, 0, 1,
+              "height", G_TYPE_INT, height,
+              "width", G_TYPE_INT, width,
+              "profile", G_TYPE_STRING, profile_str, NULL);
+
+          gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depay), srccaps);
+          gst_caps_unref (srccaps);
+
+          self->caps_sent = TRUE;
+          self->last_width = width;
+          self->last_height = height;
+          self->last_profile = profile;
+        }
+      }
+    }
+
     return out;
   }
 
@@ -197,17 +247,45 @@ too_small:
   goto done;
 }
 
+static GstStateChangeReturn
+gst_rtp_vp8_depay_change_state (GstElement * element, GstStateChange transition)
+{
+  GstRtpVP8Depay *self = GST_RTP_VP8_DEPAY (element);
+
+  switch (transition) {
+    case GST_STATE_CHANGE_READY_TO_PAUSED:
+      self->last_profile = -1;
+      self->last_height = -1;
+      self->last_width = -1;
+      self->caps_sent = FALSE;
+      break;
+    default:
+      break;
+  }
+
+  return
+      GST_ELEMENT_CLASS (gst_rtp_vp8_depay_parent_class)->change_state (element,
+      transition);
+}
+
 static gboolean
-gst_rtp_vp8_depay_set_caps (GstRTPBaseDepayload * depayload, GstCaps * caps)
+gst_rtp_vp8_depay_handle_event (GstRTPBaseDepayload * depay, GstEvent * event)
 {
-  GstCaps *srccaps = gst_caps_new_simple ("video/x-vp8",
-      "framerate", GST_TYPE_FRACTION, 0, 1,
-      NULL);
+  GstRtpVP8Depay *self = GST_RTP_VP8_DEPAY (depay);
 
-  gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload), srccaps);
-  gst_caps_unref (srccaps);
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_FLUSH_STOP:
+      self->last_profile = -1;
+      self->last_height = -1;
+      self->last_width = -1;
+      break;
+    default:
+      break;
+  }
 
-  return TRUE;
+  return
+      GST_RTP_BASE_DEPAYLOAD_CLASS
+      (gst_rtp_vp8_depay_parent_class)->handle_event (depay, event);
 }
 
 gboolean
diff --git a/gst/rtp/gstrtpvp8depay.h b/gst/rtp/gstrtpvp8depay.h
index f10b5637f07762087aedfb407f17640a8e6a4628..258546a1a517afce982b7db3ee94018e13563060 100644
--- a/gst/rtp/gstrtpvp8depay.h
+++ b/gst/rtp/gstrtpvp8depay.h
@@ -53,6 +53,11 @@ struct _GstRtpVP8Depay
   GstRTPBaseDepayload parent;
   GstAdapter *adapter;
   gboolean started;
+
+  gboolean caps_sent;
+  gint last_profile;
+  gint last_width;
+  gint last_height;
 };
 
 GType gst_rtp_vp8_depay_get_type (void);
diff --git a/gst/rtpmanager/Makefile.am b/gst/rtpmanager/Makefile.am
index bd8a1e3e7ecf1c5b0c3038a33047208d88e8a809..ea593efa950ff7c0c97cc6d45842397305af1030 100644
--- a/gst/rtpmanager/Makefile.am
+++ b/gst/rtpmanager/Makefile.am
@@ -38,18 +38,3 @@ libgstrtpmanager_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
 	$(GST_BASE_LIBS) $(GST_LIBS_LIBS)
 libgstrtpmanager_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstrtpmanager_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am
-	androgenizer \
-	-:PROJECT libgstrtpmanager -:SHARED libgstrtpmanager \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstrtpmanager_la_SOURCES) \
-	 	   $(nodist_libgstrtpmanager_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrtpmanager_la_CFLAGS) \
-	 -:LDFLAGS $(libgstrtpmanager_la_LDFLAGS) \
-	           $(libgstrtpmanager_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/rtpmanager/Makefile.in b/gst/rtpmanager/Makefile.in
index 37852c9a4f09e16aaf26016edadbcc239de8e870..5e809b6c5295054d5ed4f925e94d2271661cfa66 100644
--- a/gst/rtpmanager/Makefile.in
+++ b/gst/rtpmanager/Makefile.in
@@ -1042,21 +1042,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am
-	androgenizer \
-	-:PROJECT libgstrtpmanager -:SHARED libgstrtpmanager \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstrtpmanager_la_SOURCES) \
-	 	   $(nodist_libgstrtpmanager_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrtpmanager_la_CFLAGS) \
-	 -:LDFLAGS $(libgstrtpmanager_la_LDFLAGS) \
-	           $(libgstrtpmanager_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
index 6ba8f7aca03e6c25c94e4a39f14064d4584c5679..f0b8b4e33aca8f4354b68ad48d8d058f0241a4dc 100644
--- a/gst/rtpmanager/gstrtpbin.c
+++ b/gst/rtpmanager/gstrtpbin.c
@@ -304,15 +304,7 @@ enum
   PROP_BUFFER_MODE,
   PROP_USE_PIPELINE_CLOCK,
   PROP_DO_SYNC_EVENT,
-  PROP_DO_RETRANSMISSION,
-  PROP_LAST
-};
-
-enum
-{
-  GST_RTP_BIN_RTCP_SYNC_ALWAYS,
-  GST_RTP_BIN_RTCP_SYNC_INITIAL,
-  GST_RTP_BIN_RTCP_SYNC_RTP
+  PROP_DO_RETRANSMISSION
 };
 
 #define GST_RTP_BIN_RTCP_SYNC_TYPE (gst_rtp_bin_rtcp_sync_get_type())
diff --git a/gst/rtpmanager/gstrtpbin.h b/gst/rtpmanager/gstrtpbin.h
index 43665351c6696dbe26360ef568fc11428f3547df..fcad2a5741ce77400bb918354165236894fc6be1 100644
--- a/gst/rtpmanager/gstrtpbin.h
+++ b/gst/rtpmanager/gstrtpbin.h
@@ -36,6 +36,13 @@
 #define GST_IS_RTP_BIN_CLASS(klass) \
   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_BIN))
 
+typedef enum
+{
+  GST_RTP_BIN_RTCP_SYNC_ALWAYS,
+  GST_RTP_BIN_RTCP_SYNC_INITIAL,
+  GST_RTP_BIN_RTCP_SYNC_RTP
+} GstRTCPSync;
+
 typedef struct _GstRtpBin GstRtpBin;
 typedef struct _GstRtpBinClass GstRtpBinClass;
 typedef struct _GstRtpBinPrivate GstRtpBinPrivate;
diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c
index 999b24c71dbd7bbb74ce9fb72787b53918d25331..547bef5e4b4a72bd94f3a03d52dda5978c15ccca 100644
--- a/gst/rtpmanager/gstrtpjitterbuffer.c
+++ b/gst/rtpmanager/gstrtpjitterbuffer.c
@@ -128,12 +128,14 @@ enum
 #define DEFAULT_MODE                RTP_JITTER_BUFFER_MODE_SLAVE
 #define DEFAULT_PERCENT             0
 #define DEFAULT_DO_RETRANSMISSION   FALSE
+#define DEFAULT_RTX_NEXT_SEQNUM     TRUE
 #define DEFAULT_RTX_DELAY           -1
 #define DEFAULT_RTX_MIN_DELAY       0
 #define DEFAULT_RTX_DELAY_REORDER   3
 #define DEFAULT_RTX_RETRY_TIMEOUT   -1
 #define DEFAULT_RTX_MIN_RETRY_TIMEOUT   -1
 #define DEFAULT_RTX_RETRY_PERIOD    -1
+#define DEFAULT_RTX_MAX_RETRIES    -1
 
 #define DEFAULT_AUTO_RTX_DELAY (20 * GST_MSECOND)
 #define DEFAULT_AUTO_RTX_TIMEOUT (40 * GST_MSECOND)
@@ -148,14 +150,15 @@ enum
   PROP_MODE,
   PROP_PERCENT,
   PROP_DO_RETRANSMISSION,
+  PROP_RTX_NEXT_SEQNUM,
   PROP_RTX_DELAY,
   PROP_RTX_MIN_DELAY,
   PROP_RTX_DELAY_REORDER,
   PROP_RTX_RETRY_TIMEOUT,
   PROP_RTX_MIN_RETRY_TIMEOUT,
   PROP_RTX_RETRY_PERIOD,
-  PROP_STATS,
-  PROP_LAST
+  PROP_RTX_MAX_RETRIES,
+  PROP_STATS
 };
 
 #define JBUF_LOCK(priv)   (g_mutex_lock (&(priv)->jbuf_lock))
@@ -244,12 +247,14 @@ struct _GstRtpJitterBufferPrivate
   gint64 ts_offset;
   gboolean do_lost;
   gboolean do_retransmission;
+  gboolean rtx_next_seqnum;
   gint rtx_delay;
   guint rtx_min_delay;
   gint rtx_delay_reorder;
   gint rtx_retry_timeout;
   gint rtx_min_retry_timeout;
   gint rtx_retry_period;
+  gint rtx_max_retries;
 
   /* the last seqnum we pushed out */
   guint32 last_popped_seqnum;
@@ -530,6 +535,23 @@ gst_rtp_jitter_buffer_class_init (GstRtpJitterBufferClass * klass)
           DEFAULT_DO_RETRANSMISSION,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
+  /**
+   * GstRtpJitterBuffer:rtx-next-seqnum
+   *
+   * Estimate when the next packet should arrive and schedule a retransmission
+   * request for it.
+   * This is, when packet N arrives, a GstRTPRetransmission event is schedule
+   * for packet N+1. So it will be requested if it does not arrive at the expected time.
+   * The expected time is calculated using the dts of N and the packet spacing.
+   *
+   * Since: 1.6
+   */
+  g_object_class_install_property (gobject_class, PROP_RTX_NEXT_SEQNUM,
+      g_param_spec_boolean ("rtx-next-seqnum", "RTX next seqnum",
+          "Estimate when the next packet should arrive and schedule a "
+          "retransmission request for it.",
+          DEFAULT_RTX_NEXT_SEQNUM, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
   /**
    * GstRtpJitterBuffer:rtx-delay:
    *
@@ -623,16 +645,57 @@ gst_rtp_jitter_buffer_class_init (GstRtpJitterBufferClass * klass)
           "Try to get a retransmission for this many ms "
           "(-1 automatic)", -1, G_MAXINT, DEFAULT_RTX_RETRY_PERIOD,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  /**
+   * GstRtpJitterBuffer:rtx-max-retries:
+   *
+   * The maximum number of retries to request a retransmission.
+   *
+   * This implies that as maximum (rtx-max-retries + 1) retransmissions will be requested.
+   * When -1 is used, the number of retransmission request will not be limited.
+   *
+   * Since: 1.6
+   */
+  g_object_class_install_property (gobject_class, PROP_RTX_MAX_RETRIES,
+      g_param_spec_int ("rtx-max-retries", "RTX Max Retries",
+          "The maximum number of retries to request a retransmission. "
+          "(-1 not limited)", -1, G_MAXINT, DEFAULT_RTX_MAX_RETRIES,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
   /**
    * GstRtpJitterBuffer:stats:
    *
    * Various jitterbuffer statistics. This property returns a GstStructure
    * with name application/x-rtp-jitterbuffer-stats with the following fields:
    *
-   *  "rtx-count"         G_TYPE_UINT64 The number of retransmissions requested
-   *  "rtx-success-count" G_TYPE_UINT64 The number of successful retransmissions
-   *  "rtx-per-packet"    G_TYPE_DOUBLE Average number of RTX per packet
-   *  "rtx-rtt"           G_TYPE_UINT64 Average round trip time per RTX
+   * <itemizedlist>
+   * <listitem>
+   *   <para>
+   *   #guint64
+   *   <classname>&quot;rtx-count&quot;</classname>:
+   *   the number of retransmissions requested.
+   *   </para>
+   * </listitem>
+   * <listitem>
+   *   <para>
+   *   #guint64
+   *   <classname>&quot;rtx-success-count&quot;</classname>:
+   *   the number of successful retransmissions.
+   *   </para>
+   * </listitem>
+   * <listitem>
+   *   <para>
+   *   #gdouble
+   *   <classname>&quot;rtx-per-packet&quot;</classname>:
+   *   average number of RTX per packet.
+   *   </para>
+   * </listitem>
+   * <listitem>
+   *   <para>
+   *   #guint64
+   *   <classname>&quot;rtx-rtt&quot;</classname>:
+   *   average round trip time per RTX.
+   *   </para>
+   * </listitem>
+   * </itemizedlist>
    *
    * Since: 1.4
    */
@@ -750,12 +813,14 @@ gst_rtp_jitter_buffer_init (GstRtpJitterBuffer * jitterbuffer)
   priv->drop_on_latency = DEFAULT_DROP_ON_LATENCY;
   priv->do_lost = DEFAULT_DO_LOST;
   priv->do_retransmission = DEFAULT_DO_RETRANSMISSION;
+  priv->rtx_next_seqnum = DEFAULT_RTX_NEXT_SEQNUM;
   priv->rtx_delay = DEFAULT_RTX_DELAY;
   priv->rtx_min_delay = DEFAULT_RTX_MIN_DELAY;
   priv->rtx_delay_reorder = DEFAULT_RTX_DELAY_REORDER;
   priv->rtx_retry_timeout = DEFAULT_RTX_RETRY_TIMEOUT;
   priv->rtx_min_retry_timeout = DEFAULT_RTX_MIN_RETRY_TIMEOUT;
   priv->rtx_retry_period = DEFAULT_RTX_RETRY_PERIOD;
+  priv->rtx_max_retries = DEFAULT_RTX_MAX_RETRIES;
 
   priv->last_dts = -1;
   priv->last_rtptime = -1;
@@ -1849,11 +1914,13 @@ get_rtx_delay (GstRtpJitterBufferPrivate * priv)
   GstClockTime delay;
 
   if (priv->rtx_delay == -1) {
-    if (priv->avg_jitter == 0)
+    if (priv->avg_jitter == 0 && priv->packet_spacing == 0) {
       delay = DEFAULT_AUTO_RTX_DELAY;
-    else
-      /* jitter is in nanoseconds, 2x jitter is a good margin */
-      delay = priv->avg_jitter * 2;
+    } else {
+      /* jitter is in nanoseconds, maximum of 2x jitter and half the
+       * packet spacing is a good margin */
+      delay = MAX (priv->avg_jitter * 2, priv->packet_spacing / 2);
+    }
   } else {
     delay = priv->rtx_delay * GST_MSECOND;
   }
@@ -1910,7 +1977,7 @@ update_timers (GstRtpJitterBuffer * jitterbuffer, guint16 seqnum,
   }
 
   do_next_seqnum = do_next_seqnum && priv->packet_spacing > 0
-      && priv->do_retransmission;
+      && priv->do_retransmission && priv->rtx_next_seqnum;
 
   if (timer && timer->type != TIMER_TYPE_DEADLINE) {
     if (timer->num_rtx_retry > 0) {
@@ -1987,9 +2054,28 @@ calculate_packet_spacing (GstRtpJitterBuffer * jitterbuffer, guint32 rtptime,
   if (priv->ips_rtptime != rtptime) {
     /* rtptime changed, check dts diff */
     if (priv->ips_dts != -1 && dts != -1 && dts > priv->ips_dts) {
-      priv->packet_spacing = dts - priv->ips_dts;
+      GstClockTime new_packet_spacing = dts - priv->ips_dts;
+      GstClockTime old_packet_spacing = priv->packet_spacing;
+
+      /* Biased towards bigger packet spacings to prevent
+       * too many unneeded retransmission requests for next
+       * packets that just arrive a little later than we would
+       * expect */
+      if (old_packet_spacing > new_packet_spacing)
+        priv->packet_spacing =
+            (new_packet_spacing + 3 * old_packet_spacing) / 4;
+      else if (old_packet_spacing > 0)
+        priv->packet_spacing =
+            (3 * new_packet_spacing + old_packet_spacing) / 4;
+      else
+        priv->packet_spacing = new_packet_spacing;
+
       GST_DEBUG_OBJECT (jitterbuffer,
-          "new packet spacing %" GST_TIME_FORMAT,
+          "new packet spacing %" GST_TIME_FORMAT
+          " old packet spacing %" GST_TIME_FORMAT
+          " combined to %" GST_TIME_FORMAT,
+          GST_TIME_ARGS (new_packet_spacing),
+          GST_TIME_ARGS (old_packet_spacing),
           GST_TIME_ARGS (priv->packet_spacing));
     }
     priv->ips_rtptime = rtptime;
@@ -2004,6 +2090,7 @@ calculate_expected (GstRtpJitterBuffer * jitterbuffer, guint32 expected,
   GstRtpJitterBufferPrivate *priv = jitterbuffer->priv;
   GstClockTime total_duration, duration, expected_dts;
   TimerType type;
+  guint lost_packets = 0;
 
   GST_DEBUG_OBJECT (jitterbuffer,
       "dts %" GST_TIME_FORMAT ", last %" GST_TIME_FORMAT,
@@ -2025,7 +2112,6 @@ calculate_expected (GstRtpJitterBuffer * jitterbuffer, guint32 expected,
 
   if (total_duration > priv->latency_ns) {
     GstClockTime gap_time;
-    guint lost_packets;
 
     gap_time = total_duration - priv->latency_ns;
 
@@ -2052,7 +2138,7 @@ calculate_expected (GstRtpJitterBuffer * jitterbuffer, guint32 expected,
     priv->last_in_dts += gap_time;
   }
 
-  expected_dts = priv->last_in_dts + duration;
+  expected_dts = priv->last_in_dts + (lost_packets + 1) * duration;
 
   if (priv->do_retransmission) {
     TimerData *timer;
@@ -2063,7 +2149,7 @@ calculate_expected (GstRtpJitterBuffer * jitterbuffer, guint32 expected,
       GstClockTime timeout = timer->timeout;
 
       timer->duration = duration;
-      if (timeout > expected_dts) {
+      if (timeout > (expected_dts + timer->rtx_retry)) {
         GstClockTime delay = timeout - expected_dts - timer->rtx_retry;
         reschedule_timer (jitterbuffer, timer, timer->seqnum, expected_dts,
             delay, TRUE);
@@ -2300,6 +2386,7 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent,
             (GFunc) free_item_and_retain_events, &events);
         rtp_jitter_buffer_reset_skew (priv->jbuf);
         remove_all_timers (jitterbuffer);
+        priv->discont = TRUE;
         priv->last_popped_seqnum = -1;
         priv->next_seqnum = seqnum;
         do_next_seqnum = TRUE;
@@ -2886,8 +2973,9 @@ do_expected_timeout (GstRtpJitterBuffer * jitterbuffer, TimerData * timer,
       GST_TIME_FORMAT ", retry %" GST_TIME_FORMAT ", num_retry %u",
       GST_TIME_ARGS (timer->rtx_base), GST_TIME_ARGS (timer->rtx_delay),
       GST_TIME_ARGS (timer->rtx_retry), timer->num_rtx_retry);
-
-  if (timer->rtx_retry + timer->rtx_delay > rtx_retry_period) {
+  if ((priv->rtx_max_retries != -1
+          && timer->num_rtx_retry >= priv->rtx_max_retries)
+      || (timer->rtx_retry + timer->rtx_delay > rtx_retry_period)) {
     GST_DEBUG_OBJECT (jitterbuffer, "reschedule as LOST timer");
     /* too many retransmission request, we now convert the timer
      * to a lost timer, leave the num_rtx_retry as it is for stats */
@@ -3587,6 +3675,11 @@ gst_rtp_jitter_buffer_set_property (GObject * object,
       priv->do_retransmission = g_value_get_boolean (value);
       JBUF_UNLOCK (priv);
       break;
+    case PROP_RTX_NEXT_SEQNUM:
+      JBUF_LOCK (priv);
+      priv->rtx_next_seqnum = g_value_get_boolean (value);
+      JBUF_UNLOCK (priv);
+      break;
     case PROP_RTX_DELAY:
       JBUF_LOCK (priv);
       priv->rtx_delay = g_value_get_int (value);
@@ -3617,6 +3710,11 @@ gst_rtp_jitter_buffer_set_property (GObject * object,
       priv->rtx_retry_period = g_value_get_int (value);
       JBUF_UNLOCK (priv);
       break;
+    case PROP_RTX_MAX_RETRIES:
+      JBUF_LOCK (priv);
+      priv->rtx_max_retries = g_value_get_int (value);
+      JBUF_UNLOCK (priv);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -3678,6 +3776,11 @@ gst_rtp_jitter_buffer_get_property (GObject * object,
       g_value_set_boolean (value, priv->do_retransmission);
       JBUF_UNLOCK (priv);
       break;
+    case PROP_RTX_NEXT_SEQNUM:
+      JBUF_LOCK (priv);
+      g_value_set_boolean (value, priv->rtx_next_seqnum);
+      JBUF_UNLOCK (priv);
+      break;
     case PROP_RTX_DELAY:
       JBUF_LOCK (priv);
       g_value_set_int (value, priv->rtx_delay);
@@ -3708,6 +3811,11 @@ gst_rtp_jitter_buffer_get_property (GObject * object,
       g_value_set_int (value, priv->rtx_retry_period);
       JBUF_UNLOCK (priv);
       break;
+    case PROP_RTX_MAX_RETRIES:
+      JBUF_LOCK (priv);
+      g_value_set_int (value, priv->rtx_max_retries);
+      JBUF_UNLOCK (priv);
+      break;
     case PROP_STATS:
       g_value_take_boxed (value,
           gst_rtp_jitter_buffer_create_stats (jitterbuffer));
diff --git a/gst/rtpmanager/gstrtpmux.c b/gst/rtpmanager/gstrtpmux.c
index 5cddd046ace1056fdafdcfd5cf99203b94ecaaee..db3585bc169c5a2a00cff2054df3a11b71f55525 100644
--- a/gst/rtpmanager/gstrtpmux.c
+++ b/gst/rtpmanager/gstrtpmux.c
@@ -35,7 +35,7 @@
  * <refsect2>
  * <title>Example pipelines</title>
  * |[
- * gst-launch rtpmux name=mux ! udpsink host=127.0.0.1 port=8888        \
+ * gst-launch-1.0 rtpmux name=mux ! udpsink host=127.0.0.1 port=8888        \
  *              alsasrc ! alawenc ! rtppcmapay !                        \
  *              application/x-rtp, payload=8, rate=8000 ! mux.sink_0    \
  *              audiotestsrc is-live=1 !                                \
@@ -63,7 +63,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_rtp_mux_debug);
 
 enum
 {
-  ARG_0,
+  PROP_0,
   PROP_TIMESTAMP_OFFSET,
   PROP_SEQNUM_OFFSET,
   PROP_SEQNUM,
diff --git a/gst/rtpmanager/gstrtprtxqueue.c b/gst/rtpmanager/gstrtprtxqueue.c
index 209aa766c84f47f8b00ee88e5777afa82640ebd4..8e9854399d0fb6445e7e414d8e8345849570770f 100644
--- a/gst/rtpmanager/gstrtprtxqueue.c
+++ b/gst/rtpmanager/gstrtprtxqueue.c
@@ -44,8 +44,7 @@ enum
 {
   PROP_0,
   PROP_MAX_SIZE_TIME,
-  PROP_MAX_SIZE_PACKETS,
-  PROP_LAST
+  PROP_MAX_SIZE_PACKETS
 };
 
 static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
@@ -64,6 +63,8 @@ static gboolean gst_rtp_rtx_queue_src_event (GstPad * pad, GstObject * parent,
     GstEvent * event);
 static GstFlowReturn gst_rtp_rtx_queue_chain (GstPad * pad, GstObject * parent,
     GstBuffer * buffer);
+static GstFlowReturn gst_rtp_rtx_queue_chain_list (GstPad * pad,
+    GstObject * parent, GstBufferList * list);
 
 static GstStateChangeReturn gst_rtp_rtx_queue_change_state (GstElement *
     element, GstStateChange transition);
@@ -159,6 +160,8 @@ gst_rtp_rtx_queue_init (GstRTPRtxQueue * rtx)
   GST_PAD_SET_PROXY_ALLOCATION (rtx->sinkpad);
   gst_pad_set_chain_function (rtx->sinkpad,
       GST_DEBUG_FUNCPTR (gst_rtp_rtx_queue_chain));
+  gst_pad_set_chain_list_function (rtx->sinkpad,
+      GST_DEBUG_FUNCPTR (gst_rtp_rtx_queue_chain_list));
   gst_element_add_pad (GST_ELEMENT (rtx), rtx->sinkpad);
 
   rtx->queue = g_queue_new ();
@@ -246,6 +249,16 @@ do_push (GstBuffer * buffer, GstRTPRtxQueue * rtx)
   gst_pad_push (rtx->srcpad, buffer);
 }
 
+/* Must be called with rtx->lock */
+static void
+shrink_queue (GstRTPRtxQueue * rtx)
+{
+  if (rtx->max_size_packets) {
+    while (g_queue_get_length (rtx->queue) > rtx->max_size_packets)
+      gst_buffer_unref (g_queue_pop_tail (rtx->queue));
+  }
+}
+
 static GstFlowReturn
 gst_rtp_rtx_queue_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
 {
@@ -257,11 +270,7 @@ gst_rtp_rtx_queue_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
 
   g_mutex_lock (&rtx->lock);
   g_queue_push_head (rtx->queue, gst_buffer_ref (buffer));
-
-  if (rtx->max_size_packets) {
-    while (g_queue_get_length (rtx->queue) > rtx->max_size_packets)
-      gst_buffer_unref (g_queue_pop_tail (rtx->queue));
-  }
+  shrink_queue (rtx);
 
   pending = rtx->pending;
   rtx->pending = NULL;
@@ -275,6 +284,42 @@ gst_rtp_rtx_queue_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
   return ret;
 }
 
+static gboolean
+push_to_queue (GstBuffer ** buffer, guint idx, gpointer user_data)
+{
+  GQueue *queue = user_data;
+
+  g_queue_push_head (queue, gst_buffer_ref (*buffer));
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_rtp_rtx_queue_chain_list (GstPad * pad, GstObject * parent,
+    GstBufferList * list)
+{
+  GstRTPRtxQueue *rtx;
+  GstFlowReturn ret;
+  GList *pending;
+
+  rtx = GST_RTP_RTX_QUEUE (parent);
+
+  g_mutex_lock (&rtx->lock);
+  gst_buffer_list_foreach (list, push_to_queue, rtx->queue);
+  shrink_queue (rtx);
+
+  pending = rtx->pending;
+  rtx->pending = NULL;
+  g_mutex_unlock (&rtx->lock);
+
+  g_list_foreach (pending, (GFunc) do_push, rtx);
+  g_list_free (pending);
+
+  ret = gst_pad_push_list (rtx->srcpad, list);
+
+  return ret;
+}
+
 static void
 gst_rtp_rtx_queue_get_property (GObject * object,
     guint prop_id, GValue * value, GParamSpec * pspec)
diff --git a/gst/rtpmanager/gstrtprtxreceive.c b/gst/rtpmanager/gstrtprtxreceive.c
index 32933a1f75700fc493785e91bbed450a4ac49c91..71b80236a41ee6e5c3186ce256083fe8119c437f 100644
--- a/gst/rtpmanager/gstrtprtxreceive.c
+++ b/gst/rtpmanager/gstrtprtxreceive.c
@@ -133,8 +133,7 @@ enum
   PROP_PAYLOAD_TYPE_MAP,
   PROP_NUM_RTX_REQUESTS,
   PROP_NUM_RTX_PACKETS,
-  PROP_NUM_RTX_ASSOC_PACKETS,
-  PROP_LAST
+  PROP_NUM_RTX_ASSOC_PACKETS
 };
 
 static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
@@ -310,11 +309,11 @@ gst_rtp_rtx_receive_src_event (GstPad * pad, GstObject * parent,
         guint ssrc = 0;
         gpointer ssrc2 = 0;
 
-        /* retrieve seqnum of the packet that need to be restransmisted */
+        /* retrieve seqnum of the packet that need to be retransmitted */
         if (!gst_structure_get_uint (s, "seqnum", &seqnum))
           seqnum = -1;
 
-        /* retrieve ssrc of the packet that need to be restransmisted
+        /* retrieve ssrc of the packet that need to be retransmitted
          * it's usefull when reconstructing the original packet from the rtx packet */
         if (!gst_structure_get_uint (s, "ssrc", &ssrc))
           ssrc = -1;
@@ -329,7 +328,7 @@ gst_rtp_rtx_receive_src_event (GstPad * pad, GstObject * parent,
         ++rtx->num_rtx_requests;
 
         /* First, we lookup in our map to see if we have already associate this
-         * master stream ssrc with its retransmisted stream.
+         * master stream ssrc with its retransmitted stream.
          * Every ssrc are unique so we can use the same hash table
          * for both retrieving the ssrc1 from ssrc2 and also ssrc2 from ssrc1
          */
@@ -389,17 +388,19 @@ gst_rtp_rtx_receive_src_event (GstPad * pad, GstObject * parent,
           retransmit:
             /* the request has not been already considered
              * insert it for the first time */
-            GST_DEBUG_OBJECT (rtx,
-                "packet number %" G_GUINT32_FORMAT " of master stream %"
-                G_GUINT32_FORMAT " needs to be retransmited", seqnum, ssrc);
             g_hash_table_insert (rtx->seqnum_ssrc1_map,
                 GUINT_TO_POINTER (seqnum),
                 ssrc_assoc_new (ssrc, rtx->last_time));
           }
         }
 
+        GST_DEBUG_OBJECT (rtx,
+            "packet number %" G_GUINT32_FORMAT " of master stream %"
+            G_GUINT32_FORMAT " needs to be retransmitted", seqnum, ssrc);
+
         GST_OBJECT_UNLOCK (rtx);
       }
+
       /* Transfer event upstream so that the request can acutally by translated
        * through gstrtpsession through the network */
       res = gst_pad_event_default (pad, parent, event);
@@ -532,13 +533,13 @@ gst_rtp_rtx_receive_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
     } else {
       SsrcAssoc *assoc;
 
-      /* the current retransmisted packet has its rtx stream not already
+      /* the current retransmitted packet has its rtx stream not already
        * associated to a master stream, so retrieve it from our request
        * history */
       if (g_hash_table_lookup_extended (rtx->seqnum_ssrc1_map,
               GUINT_TO_POINTER (orign_seqnum), NULL, (gpointer *) & assoc)) {
         GST_DEBUG_OBJECT (rtx,
-            "associate retransmisted stream %" G_GUINT32_FORMAT
+            "associate retransmitted stream %" G_GUINT32_FORMAT
             " to master stream %" G_GUINT32_FORMAT " thanks to packet %"
             G_GUINT16_FORMAT "", ssrc, assoc->ssrc, orign_seqnum);
         ssrc1 = GUINT_TO_POINTER (assoc->ssrc);
diff --git a/gst/rtpmanager/gstrtprtxsend.c b/gst/rtpmanager/gstrtprtxsend.c
index 922fad3b2ed3fc8b28ed8714e0aeec20715d77d3..d9cc69f7184918d5bfa5937ebd00e8e0220a30ea 100644
--- a/gst/rtpmanager/gstrtprtxsend.c
+++ b/gst/rtpmanager/gstrtprtxsend.c
@@ -61,8 +61,7 @@ enum
   PROP_MAX_SIZE_TIME,
   PROP_MAX_SIZE_PACKETS,
   PROP_NUM_RTX_REQUESTS,
-  PROP_NUM_RTX_PACKETS,
-  PROP_LAST
+  PROP_NUM_RTX_PACKETS
 };
 
 static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
@@ -86,6 +85,8 @@ static gboolean gst_rtp_rtx_send_sink_event (GstPad * pad, GstObject * parent,
     GstEvent * event);
 static GstFlowReturn gst_rtp_rtx_send_chain (GstPad * pad, GstObject * parent,
     GstBuffer * buffer);
+static GstFlowReturn gst_rtp_rtx_send_chain_list (GstPad * pad,
+    GstObject * parent, GstBufferList * list);
 
 static void gst_rtp_rtx_send_src_loop (GstRtpRtxSend * rtx);
 static gboolean gst_rtp_rtx_send_activate_mode (GstPad * pad,
@@ -119,7 +120,7 @@ buffer_queue_item_free (BufferQueueItem * item)
 typedef struct
 {
   guint32 rtx_ssrc;
-  guint16 next_seqnum;
+  guint16 seqnum_base, next_seqnum;
   gint clock_rate;
 
   /* history of rtp packets */
@@ -132,7 +133,7 @@ ssrc_rtx_data_new (guint32 rtx_ssrc)
   SSRCRtxData *data = g_slice_new0 (SSRCRtxData);
 
   data->rtx_ssrc = rtx_ssrc;
-  data->next_seqnum = g_random_int_range (0, G_MAXUINT16);
+  data->next_seqnum = data->seqnum_base = g_random_int_range (0, G_MAXUINT16);
   data->queue = g_sequence_new ((GDestroyNotify) buffer_queue_item_free);
 
   return data;
@@ -258,6 +259,8 @@ gst_rtp_rtx_send_init (GstRtpRtxSend * rtx)
       GST_DEBUG_FUNCPTR (gst_rtp_rtx_send_sink_event));
   gst_pad_set_chain_function (rtx->sinkpad,
       GST_DEBUG_FUNCPTR (gst_rtp_rtx_send_chain));
+  gst_pad_set_chain_list_function (rtx->sinkpad,
+      GST_DEBUG_FUNCPTR (gst_rtp_rtx_send_chain_list));
   gst_element_add_pad (GST_ELEMENT (rtx), rtx->sinkpad);
 
   rtx->queue = gst_data_queue_new (gst_rtp_rtx_send_queue_check_full, NULL,
@@ -426,6 +429,9 @@ gst_rtp_rtx_buffer_new (GstRtpRtxSend * rtx, GstBuffer * buffer)
   gst_rtp_buffer_set_padding (&new_rtp, FALSE);
   gst_rtp_buffer_unmap (&new_rtp);
 
+  /* Copy over timestamps */
+  gst_buffer_copy_into (new_buffer, buffer, GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
+
   return new_buffer;
 }
 
@@ -456,11 +462,11 @@ gst_rtp_rtx_send_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
         guint ssrc = 0;
         GstBuffer *rtx_buf = NULL;
 
-        /* retrieve seqnum of the packet that need to be restransmisted */
+        /* retrieve seqnum of the packet that need to be retransmitted */
         if (!gst_structure_get_uint (s, "seqnum", &seqnum))
           seqnum = -1;
 
-        /* retrieve ssrc of the packet that need to be restransmisted */
+        /* retrieve ssrc of the packet that need to be retransmitted */
         if (!gst_structure_get_uint (s, "ssrc", &ssrc))
           ssrc = -1;
 
@@ -586,22 +592,52 @@ gst_rtp_rtx_send_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
       GstCaps *caps;
       GstStructure *s;
       guint ssrc;
+      gint payload;
+      gpointer rtx_payload;
       SSRCRtxData *data;
 
       gst_event_parse_caps (event, &caps);
-      g_assert (gst_caps_is_fixed (caps));
 
       s = gst_caps_get_structure (caps, 0);
       if (!gst_structure_get_uint (s, "ssrc", &ssrc))
         ssrc = -1;
+      if (!gst_structure_get_int (s, "payload", &payload))
+        payload = -1;
+
+      if (payload == -1)
+        GST_WARNING_OBJECT (rtx, "No payload in caps");
 
       GST_OBJECT_LOCK (rtx);
       data = gst_rtp_rtx_send_get_ssrc_data (rtx, ssrc);
+      if (!g_hash_table_lookup_extended (rtx->rtx_pt_map,
+              GUINT_TO_POINTER (payload), NULL, &rtx_payload))
+        rtx_payload = GINT_TO_POINTER (-1);
+
+      if (GPOINTER_TO_INT (rtx_payload) == -1 && payload != -1)
+        GST_WARNING_OBJECT (rtx, "Payload %d not in rtx-pt-map", payload);
+
+      GST_DEBUG_OBJECT (rtx,
+          "got caps for payload: %d->%d, ssrc: %u->%d: %" GST_PTR_FORMAT,
+          payload, GPOINTER_TO_INT (rtx_payload), ssrc, data->rtx_ssrc, caps);
+
       gst_structure_get_int (s, "clock-rate", &data->clock_rate);
 
+      /* The session might need to know the RTX ssrc */
+      caps = gst_caps_copy (caps);
+      gst_caps_set_simple (caps, "rtx-ssrc", G_TYPE_UINT, data->rtx_ssrc,
+          "rtx-seqnum-offset", G_TYPE_UINT, data->seqnum_base, NULL);
+
+      if (GPOINTER_TO_INT (rtx_payload) != -1)
+        gst_caps_set_simple (caps, "rtx-payload", G_TYPE_INT,
+            GPOINTER_TO_INT (rtx_payload), NULL);
+
       GST_DEBUG_OBJECT (rtx, "got clock-rate from caps: %d for ssrc: %u",
           data->clock_rate, ssrc);
       GST_OBJECT_UNLOCK (rtx);
+
+      gst_event_unref (event);
+      event = gst_event_new_caps (caps);
+      gst_caps_unref (caps);
       break;
     }
     default:
@@ -640,11 +676,10 @@ gst_rtp_rtx_send_get_ts_diff (SSRCRtxData * data)
   return (guint32) gst_util_uint64_scale_int (result, 1000, data->clock_rate);
 }
 
-static GstFlowReturn
-gst_rtp_rtx_send_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+/* Must be called with lock */
+static void
+process_buffer (GstRtpRtxSend * rtx, GstBuffer * buffer)
 {
-  GstRtpRtxSend *rtx = GST_RTP_RTX_SEND (parent);
-  GstFlowReturn ret = GST_FLOW_ERROR;
   GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
   BufferQueueItem *item;
   SSRCRtxData *data;
@@ -660,7 +695,9 @@ gst_rtp_rtx_send_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
   rtptime = gst_rtp_buffer_get_timestamp (&rtp);
   gst_rtp_buffer_unmap (&rtp);
 
-  GST_OBJECT_LOCK (rtx);
+  GST_LOG_OBJECT (rtx,
+      "Processing buffer seqnum: %" G_GUINT16_FORMAT ", ssrc: %"
+      G_GUINT32_FORMAT, seqnum, ssrc);
 
   /* do not store the buffer if it's payload type is unknown */
   if (g_hash_table_contains (rtx->rtx_pt_map, GUINT_TO_POINTER (payload_type))) {
@@ -683,14 +720,41 @@ gst_rtp_rtx_send_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
         g_sequence_remove (g_sequence_get_begin_iter (data->queue));
     }
   }
+}
+
+static GstFlowReturn
+gst_rtp_rtx_send_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+{
+  GstRtpRtxSend *rtx = GST_RTP_RTX_SEND (parent);
+  GstFlowReturn ret;
 
+  GST_OBJECT_LOCK (rtx);
+  process_buffer (rtx, buffer);
   GST_OBJECT_UNLOCK (rtx);
+  ret = gst_pad_push (rtx->srcpad, buffer);
 
-  GST_LOG_OBJECT (rtx,
-      "push seqnum: %" G_GUINT16_FORMAT ", ssrc: %" G_GUINT32_FORMAT, seqnum,
-      ssrc);
+  return ret;
+}
 
-  ret = gst_pad_push (rtx->srcpad, buffer);
+static gboolean
+process_buffer_from_list (GstBuffer ** buffer, guint idx, gpointer user_data)
+{
+  process_buffer (user_data, *buffer);
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_rtp_rtx_send_chain_list (GstPad * pad, GstObject * parent,
+    GstBufferList * list)
+{
+  GstRtpRtxSend *rtx = GST_RTP_RTX_SEND (parent);
+  GstFlowReturn ret;
+
+  GST_OBJECT_LOCK (rtx);
+  gst_buffer_list_foreach (list, process_buffer_from_list, rtx);
+  GST_OBJECT_UNLOCK (rtx);
+
+  ret = gst_pad_push_list (rtx->srcpad, list);
 
   return ret;
 }
diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c
index 3a968a545029d91ceee09e4a7558a835624c7a9b..8838aafaef426441aa4e17d8689f5265a7e5b937 100644
--- a/gst/rtpmanager/gstrtpsession.c
+++ b/gst/rtpmanager/gstrtpsession.c
@@ -191,8 +191,8 @@ enum
   LAST_SIGNAL
 };
 
-#define DEFAULT_BANDWIDTH            RTP_STATS_BANDWIDTH
-#define DEFAULT_RTCP_FRACTION        (RTP_STATS_BANDWIDTH * RTP_STATS_RTCP_FRACTION)
+#define DEFAULT_BANDWIDTH            0
+#define DEFAULT_RTCP_FRACTION        RTP_STATS_RTCP_FRACTION
 #define DEFAULT_RTCP_RR_BANDWIDTH    -1
 #define DEFAULT_RTCP_RS_BANDWIDTH    -1
 #define DEFAULT_SDES                 NULL
@@ -216,8 +216,7 @@ enum
   PROP_USE_PIPELINE_CLOCK,
   PROP_RTCP_MIN_INTERVAL,
   PROP_PROBATION,
-  PROP_STATS,
-  PROP_LAST
+  PROP_STATS
 };
 
 #define GST_RTP_SESSION_GET_PRIVATE(obj)  \
@@ -911,7 +910,7 @@ rtcp_thread (GstRtpSession * rtpsession)
   GST_RTP_SESSION_LOCK (rtpsession);
 
   while (rtpsession->priv->wait_send) {
-    GST_LOG_OBJECT (rtpsession, "waiting for RTP thread");
+    GST_LOG_OBJECT (rtpsession, "waiting for getting started");
     GST_RTP_SESSION_WAIT (rtpsession);
     GST_LOG_OBJECT (rtpsession, "signaled...");
   }
@@ -1721,6 +1720,14 @@ gst_rtp_session_chain_recv_rtp (GstPad * pad, GstObject * parent,
 
   GST_LOG_OBJECT (rtpsession, "received RTP packet");
 
+  GST_RTP_SESSION_LOCK (rtpsession);
+  if (rtpsession->priv->wait_send) {
+    GST_LOG_OBJECT (rtpsession, "signal RTCP thread");
+    rtpsession->priv->wait_send = FALSE;
+    GST_RTP_SESSION_SIGNAL (rtpsession);
+  }
+  GST_RTP_SESSION_UNLOCK (rtpsession);
+
   /* get NTP time when this packet was captured, this depends on the timestamp. */
   timestamp = GST_BUFFER_TIMESTAMP (buffer);
   if (GST_CLOCK_TIME_IS_VALID (timestamp)) {
@@ -1765,6 +1772,18 @@ gst_rtp_session_event_recv_rtcp_sink (GstPad * pad, GstObject * parent,
       GST_EVENT_TYPE_NAME (event));
 
   switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_SEGMENT:
+      /* Make sure that the sync_src pad has caps before the segment event.
+       * Otherwise we might get a segment event before caps from the receive
+       * RTCP pad, and then later when receiving RTCP packets will set caps.
+       * This will results in a sticky event misordering warning
+       */
+      if (!gst_pad_has_current_caps (rtpsession->sync_src)) {
+        GstCaps *caps = gst_caps_new_empty_simple ("application/x-rtcp");
+        gst_pad_set_caps (rtpsession->sync_src, caps);
+        gst_caps_unref (caps);
+      }
+      /* fall through */
     default:
       ret = gst_pad_push_event (rtpsession->sync_src, event);
       break;
@@ -1790,6 +1809,14 @@ gst_rtp_session_chain_recv_rtcp (GstPad * pad, GstObject * parent,
 
   GST_LOG_OBJECT (rtpsession, "received RTCP packet");
 
+  GST_RTP_SESSION_LOCK (rtpsession);
+  if (rtpsession->priv->wait_send) {
+    GST_LOG_OBJECT (rtpsession, "signal RTCP thread");
+    rtpsession->priv->wait_send = FALSE;
+    GST_RTP_SESSION_SIGNAL (rtpsession);
+  }
+  GST_RTP_SESSION_UNLOCK (rtpsession);
+
   current_time = gst_clock_get_time (priv->sysclock);
   get_current_times (rtpsession, NULL, &ntpnstime);
 
diff --git a/gst/rtpmanager/rtpjitterbuffer.c b/gst/rtpmanager/rtpjitterbuffer.c
index 1292d7dfcfad2e8965a7efcae9a69600c4749ef8..f41b799c908aed8224f7cbac5a952a936b2cd534 100644
--- a/gst/rtpmanager/rtpjitterbuffer.c
+++ b/gst/rtpmanager/rtpjitterbuffer.c
@@ -445,7 +445,7 @@ calculate_skew (RTPJitterBuffer * jbuf, guint32 rtptime, GstClockTime time)
   /* need resync, lock on to time and gstrtptime if we can, otherwise we
    * do with the previous values */
   if (G_UNLIKELY (jbuf->need_resync && time != -1)) {
-    GST_WARNING ("resync to time %" GST_TIME_FORMAT ", rtptime %"
+    GST_INFO ("resync to time %" GST_TIME_FORMAT ", rtptime %"
         GST_TIME_FORMAT, GST_TIME_ARGS (time), GST_TIME_ARGS (gstrtptime));
     rtp_jitter_buffer_resync (jbuf, time, gstrtptime, ext_rtptime, FALSE);
     send_diff = 0;
diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c
index 486ac3ac2c1aaa037dd39686af97827412378ab6..0acac153aef78dd373a12438994add29cddff943 100644
--- a/gst/rtpmanager/rtpsession.c
+++ b/gst/rtpmanager/rtpsession.c
@@ -55,8 +55,8 @@ enum
 };
 
 #define DEFAULT_INTERNAL_SOURCE      NULL
-#define DEFAULT_BANDWIDTH            RTP_STATS_BANDWIDTH
-#define DEFAULT_RTCP_FRACTION        (RTP_STATS_RTCP_FRACTION * RTP_STATS_BANDWIDTH)
+#define DEFAULT_BANDWIDTH            0.0
+#define DEFAULT_RTCP_FRACTION        RTP_STATS_RTCP_FRACTION
 #define DEFAULT_RTCP_RR_BANDWIDTH    -1
 #define DEFAULT_RTCP_RS_BANDWIDTH    -1
 #define DEFAULT_RTCP_MTU             1400
@@ -88,8 +88,7 @@ enum
   PROP_RTCP_FEEDBACK_RETENTION_WINDOW,
   PROP_RTCP_IMMEDIATE_FEEDBACK_THRESHOLD,
   PROP_PROBATION,
-  PROP_STATS,
-  PROP_LAST
+  PROP_STATS
 };
 
 /* update average packet size */
@@ -2701,6 +2700,15 @@ rtp_session_update_send_caps (RTPSession * sess, GstCaps * caps)
       rtp_source_update_caps (source, caps);
       g_object_unref (source);
     }
+
+    if (gst_structure_get_uint (s, "rtx-ssrc", &ssrc)) {
+      source =
+          obtain_internal_source (sess, ssrc, &created, GST_CLOCK_TIME_NONE);
+      if (source) {
+        rtp_source_update_caps (source, caps);
+        g_object_unref (source);
+      }
+    }
     RTP_SESSION_UNLOCK (sess);
   }
 }
@@ -2793,9 +2801,8 @@ calculate_rtcp_interval (RTPSession * sess, gboolean deterministic,
 
       g_hash_table_foreach (sess->ssrcs[sess->mask_idx],
           (GHFunc) add_bitrates, &bandwidth);
-      bandwidth /= 8.0;
     }
-    if (bandwidth < 8000)
+    if (bandwidth < RTP_STATS_BANDWIDTH)
       bandwidth = RTP_STATS_BANDWIDTH;
 
     rtp_stats_set_bandwidths (&sess->stats, bandwidth,
@@ -3555,7 +3562,7 @@ early:
     /* Apply the rules from RFC 4585 section 3.5.3 */
     if (stats->min_interval != 0 && !sess->first_rtcp) {
       GstClockTime T_rr_current_interval =
-          g_random_double_range (0.5, 1.5) * stats->min_interval;
+          g_random_double_range (0.5, 1.5) * stats->min_interval * GST_SECOND;
 
       /* This will caused the RTCP to be suppressed if no FB packets are added */
       if (sess->last_rtcp_send_time + T_rr_current_interval > new_send_time) {
@@ -3848,7 +3855,7 @@ rtp_session_request_early_rtcp (RTPSession * sess, GstClockTime current_time,
   /*  RFC 4585 section 3.5.2 step 2 */
   if (GST_CLOCK_TIME_IS_VALID (sess->next_early_rtcp_time)) {
     GST_LOG_OBJECT (sess, "already have next early rtcp time");
-    ret = TRUE;
+    ret = (current_time + max_delay > sess->next_early_rtcp_time);
     goto end;
   }
 
@@ -3874,6 +3881,11 @@ rtp_session_request_early_rtcp (RTPSession * sess, GstClockTime current_time,
           GST_TIME_ARGS (sess->next_rtcp_check_time));
       ret = TRUE;
     } else {
+      GST_LOG_OBJECT (sess,
+          "can't allow early feedback, next scheduled time is too late %"
+          GST_TIME_FORMAT " + %" GST_TIME_FORMAT " < %" GST_TIME_FORMAT,
+          GST_TIME_ARGS (current_time), GST_TIME_ARGS (max_delay),
+          GST_TIME_ARGS (sess->next_rtcp_check_time));
       ret = FALSE;
     }
     goto end;
@@ -3896,8 +3908,12 @@ rtp_session_request_early_rtcp (RTPSession * sess, GstClockTime current_time,
 
   /*  RFC 4585 section 3.5.2 step 3 */
   if (current_time + T_dither_max > sess->next_rtcp_check_time) {
-    GST_LOG_OBJECT (sess, "don't send because of dither");
-    ret = FALSE;
+    GST_LOG_OBJECT (sess,
+        "don't send because of dither, next scheduled time is soon %"
+        GST_TIME_FORMAT " + %" GST_TIME_FORMAT " > %" GST_TIME_FORMAT,
+        GST_TIME_ARGS (current_time), GST_TIME_ARGS (T_dither_max),
+        GST_TIME_ARGS (sess->next_rtcp_check_time));
+    ret = TRUE;
     goto end;
   }
 
@@ -3912,7 +3928,11 @@ rtp_session_request_early_rtcp (RTPSession * sess, GstClockTime current_time,
           GST_TIME_ARGS (sess->next_rtcp_check_time));
       ret = TRUE;
     } else {
-      GST_LOG_OBJECT (sess, "can't allow early feedback");
+      GST_LOG_OBJECT (sess,
+          "can't allow early feedback, next scheduled time is too late %"
+          GST_TIME_FORMAT " + %" GST_TIME_FORMAT " < %" GST_TIME_FORMAT,
+          GST_TIME_ARGS (current_time), GST_TIME_ARGS (max_delay),
+          GST_TIME_ARGS (sess->next_rtcp_check_time));
       ret = FALSE;
     }
     goto end;
@@ -3936,8 +3956,10 @@ rtp_session_request_early_rtcp (RTPSession * sess, GstClockTime current_time,
   sess->next_rtcp_check_time = sess->last_rtcp_send_time + 2 * T_rr;
   sess->last_rtcp_send_time += T_rr;
 
-  GST_LOG_OBJECT (sess, "next early RTCP time %" GST_TIME_FORMAT,
-      GST_TIME_ARGS (sess->next_early_rtcp_time));
+  GST_LOG_OBJECT (sess, "next early RTCP time %" GST_TIME_FORMAT
+      ", next regular RTCP time %" GST_TIME_FORMAT,
+      GST_TIME_ARGS (sess->next_early_rtcp_time),
+      GST_TIME_ARGS (sess->next_rtcp_check_time));
   RTP_SESSION_UNLOCK (sess);
 
   /* notify app of need to send packet early
diff --git a/gst/rtpmanager/rtpsource.c b/gst/rtpmanager/rtpsource.c
index 6b0cec5d9c74c92b7b229238aa0fe5e783946b70..d97adc4eaa1f9531b16758a4ff399836e95367f9 100644
--- a/gst/rtpmanager/rtpsource.c
+++ b/gst/rtpmanager/rtpsource.c
@@ -50,8 +50,7 @@ enum
   PROP_IS_SENDER,
   PROP_SDES,
   PROP_STATS,
-  PROP_PROBATION,
-  PROP_LAST
+  PROP_PROBATION
 };
 
 /* GObject vmethods */
@@ -748,6 +747,7 @@ rtp_source_update_caps (RTPSource * src, GstCaps * caps)
   GstStructure *s;
   guint val;
   gint ival;
+  gboolean rtx;
 
   /* nothing changed, return */
   if (caps == NULL || src->caps == caps)
@@ -755,11 +755,14 @@ rtp_source_update_caps (RTPSource * src, GstCaps * caps)
 
   s = gst_caps_get_structure (caps, 0);
 
-  if (gst_structure_get_int (s, "payload", &ival))
+  rtx = (gst_structure_get_uint (s, "rtx-ssrc", &val) && val == src->ssrc);
+
+  if (gst_structure_get_int (s, rtx ? "rtx-payload" : "payload", &ival))
     src->payload = ival;
   else
     src->payload = -1;
-  GST_DEBUG ("got payload %d", src->payload);
+
+  GST_DEBUG ("got %spayload %d", rtx ? "rtx " : "", src->payload);
 
   if (gst_structure_get_int (s, "clock-rate", &ival))
     src->clock_rate = ival;
@@ -768,12 +771,14 @@ rtp_source_update_caps (RTPSource * src, GstCaps * caps)
 
   GST_DEBUG ("got clock-rate %d", src->clock_rate);
 
-  if (gst_structure_get_uint (s, "seqnum-offset", &val))
+  if (gst_structure_get_uint (s, rtx ? "rtx-seqnum-offset" : "seqnum-offset",
+          &val))
     src->seqnum_offset = val;
   else
     src->seqnum_offset = -1;
 
-  GST_DEBUG ("got seqnum-offset %" G_GINT32_FORMAT, src->seqnum_offset);
+  GST_DEBUG ("got %sseqnum-offset %" G_GINT32_FORMAT, rtx ? "rtx " : "",
+      src->seqnum_offset);
 
   gst_caps_replace (&src->caps, caps);
 }
diff --git a/gst/rtpmanager/rtpstats.c b/gst/rtpmanager/rtpstats.c
index 4da164cfdde9a70ea2c6969c9d2c4a58346bb15b..56e58b71dbfcea0f6a5d00d1666f100b7eccfafd 100644
--- a/gst/rtpmanager/rtpstats.c
+++ b/gst/rtpmanager/rtpstats.c
@@ -166,10 +166,10 @@ rtp_stats_calculate_rtcp_interval (RTPSessionStats * stats, gboolean we_send,
 
   /* no bandwidth for RTCP, return NONE to signal that we don't want to send
    * RTCP packets */
-  if (rtcp_bw <= 0.00001)
+  if (rtcp_bw <= 0.0001)
     return GST_CLOCK_TIME_NONE;
 
-  avg_rtcp_size = stats->avg_rtcp_packet_size;
+  avg_rtcp_size = 8.0 * stats->avg_rtcp_packet_size;
   /*
    * The effective number of sites times the average packet size is
    * the total number of octets sent when each site sends a report.
@@ -249,7 +249,7 @@ rtp_stats_calculate_bye_interval (RTPSessionStats * stats)
   if (rtcp_bw <= 0.0001)
     return GST_CLOCK_TIME_NONE;
 
-  avg_rtcp_size = stats->avg_rtcp_packet_size;
+  avg_rtcp_size = 8.0 * stats->avg_rtcp_packet_size;
   /*
    * The effective number of sites times the average packet size is
    * the total number of octets sent when each site sends a report.
diff --git a/gst/rtsp/Makefile.am b/gst/rtsp/Makefile.am
index 59030d754f1797b82623ae6ae20dfe7d6a8298f2..267e49a8a835d827a0b21c935adde9ae29d50b02 100644
--- a/gst/rtsp/Makefile.am
+++ b/gst/rtsp/Makefile.am
@@ -14,17 +14,3 @@ noinst_HEADERS = gstrtspsrc.h     \
 		 gstrtsp.h        \
 		 gstrtpdec.h      \
 		 gstrtspext.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstrtsp -:SHARED libgstrtsp \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstrtsp_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrtsp_la_CFLAGS) \
-	 -:LDFLAGS $(libgstrtsp_la_LDFLAGS) \
-	           $(libgstrtsp_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/rtsp/Makefile.in b/gst/rtsp/Makefile.in
index cb211a9cbbd4ba969454c3005a6e18d8bf042a3b..c2958e18c4f1e3aab8a35ee040ce15a9b8aeb6c7 100644
--- a/gst/rtsp/Makefile.in
+++ b/gst/rtsp/Makefile.in
@@ -919,20 +919,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstrtsp -:SHARED libgstrtsp \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstrtsp_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrtsp_la_CFLAGS) \
-	 -:LDFLAGS $(libgstrtsp_la_LDFLAGS) \
-	           $(libgstrtsp_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index c7860243a0e20ec7ab04ce9d64eef5c7278c03de..397ef3187bf2e05330145799ad5a5aafe69e2bd6 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -232,8 +232,7 @@ enum
   PROP_SDES,
   PROP_TLS_VALIDATION_FLAGS,
   PROP_TLS_DATABASE,
-  PROP_DO_RETRANSMISSION,
-  PROP_LAST
+  PROP_DO_RETRANSMISSION
 };
 
 #define GST_TYPE_RTSP_NAT_METHOD (gst_rtsp_nat_method_get_type())
@@ -338,6 +337,31 @@ static guint gst_rtspsrc_signals[LAST_SIGNAL] = { 0 };
 G_DEFINE_TYPE_WITH_CODE (GstRTSPSrc, gst_rtspsrc, GST_TYPE_BIN,
     G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_rtspsrc_uri_handler_init));
 
+#ifndef GST_DISABLE_GST_DEBUG
+static inline const char *
+cmd_to_string (guint cmd)
+{
+  switch (cmd) {
+    case CMD_OPEN:
+      return "OPEN";
+    case CMD_PLAY:
+      return "PLAY";
+    case CMD_PAUSE:
+      return "PAUSE";
+    case CMD_CLOSE:
+      return "CLOSE";
+    case CMD_WAIT:
+      return "WAIT";
+    case CMD_RECONNECT:
+      return "RECONNECT";
+    case CMD_LOOP:
+      return "LOOP";
+  }
+
+  return "unknown";
+}
+#endif
+
 static gboolean
 default_select_stream (GstRTSPSrc * src, guint id, GstCaps * caps)
 {
@@ -1636,10 +1660,9 @@ gst_rtspsrc_cleanup (GstRTSPSrc * src)
     gst_sdp_message_free (src->sdp);
     src->sdp = NULL;
   }
-  if (src->start_segment) {
-    gst_event_unref (src->start_segment);
-    src->start_segment = NULL;
-  }
+
+  src->need_segment = FALSE;
+
   if (src->provided_clock) {
     gst_object_unref (src->provided_clock);
     src->provided_clock = NULL;
@@ -2384,16 +2407,6 @@ out:
   gst_query_unref (query);
 }
 
-static gboolean
-gst_rtspsrc_do_seek (GstRTSPSrc * src, GstSegment * segment)
-{
-  src->state = GST_RTSP_STATE_SEEKING;
-  /* PLAY will add the range header now. */
-  src->need_range = TRUE;
-
-  return TRUE;
-}
-
 static gboolean
 gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
 {
@@ -2483,7 +2496,10 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
   }
   src->skip = skip;
 
-  gst_rtspsrc_do_seek (src, &seeksegment);
+  src->state = GST_RTSP_STATE_SEEKING;
+
+  /* PLAY will add the range header now. */
+  src->need_range = TRUE;
 
   /* and continue playing */
   if (playing)
@@ -2691,9 +2707,8 @@ gst_rtspsrc_handle_src_query (GstPad * pad, GstObject * parent,
         seekable = seekable && src->seekable && src->segment.duration &&
             GST_CLOCK_TIME_IS_VALID (src->segment.duration);
 
-        /* FIXME ?? should we have 0 and segment.duration here; see demuxers */
-        gst_query_set_seeking (query, GST_FORMAT_TIME, seekable,
-            src->segment.start, src->segment.stop);
+        gst_query_set_seeking (query, GST_FORMAT_TIME, seekable, 0,
+            src->segment.duration);
         res = TRUE;
       }
       break;
@@ -3185,9 +3200,13 @@ add_retransmission (GstRTSPSrc * src, GstRTSPTransport * transport)
 {
   GList *walk;
   guint signal_id;
+  gboolean do_retransmission = FALSE;
 
   if (transport->trans != GST_RTSP_TRANS_RTP)
     return;
+  if (transport->profile != GST_RTSP_PROFILE_AVPF &&
+      transport->profile != GST_RTSP_PROFILE_SAVPF)
+    return;
 
   signal_id = g_signal_lookup ("request-aux-receiver",
       G_OBJECT_TYPE (src->manager));
@@ -3203,6 +3222,7 @@ add_retransmission (GstRTSPSrc * src, GstRTSPTransport * transport)
   /* build the retransmission payload type map */
   for (walk = src->streams; walk; walk = g_list_next (walk)) {
     GstRTSPStream *stream = (GstRTSPStream *) walk->data;
+    gboolean do_retransmission_stream = FALSE;
     int i;
 
     if (stream->rtx_pt_map)
@@ -3226,21 +3246,37 @@ add_retransmission (GstRTSPSrc * src, GstRTSPTransport * transport)
           if (rtx_pt != 0) {
             gst_structure_set (stream->rtx_pt_map, stream_pt_s, G_TYPE_UINT,
                 rtx_pt, NULL);
+            do_retransmission_stream = TRUE;
           }
         }
       }
     }
 
-    GST_DEBUG_OBJECT (src, "built retransmission payload map for stream "
-        "id %i: %" GST_PTR_FORMAT, stream->id, stream->rtx_pt_map);
+    if (do_retransmission_stream) {
+      GST_DEBUG_OBJECT (src, "built retransmission payload map for stream "
+          "id %i: %" GST_PTR_FORMAT, stream->id, stream->rtx_pt_map);
+      do_retransmission = TRUE;
+    } else {
+      GST_DEBUG_OBJECT (src, "no retransmission payload map for stream "
+          "id %i", stream->id);
+      gst_structure_free (stream->rtx_pt_map);
+      stream->rtx_pt_map = NULL;
+    }
   }
 
-  g_object_set (src->manager, "do-retransmission", TRUE, NULL);
+  if (do_retransmission) {
+    GST_DEBUG_OBJECT (src, "Enabling retransmissions");
+
+    g_object_set (src->manager, "do-retransmission", TRUE, NULL);
 
-  /* enable RFC4588 retransmission handling by setting rtprtxreceive
-   * as the "aux" element of rtpbin */
-  g_signal_connect (src->manager, "request-aux-receiver",
-      (GCallback) request_aux_receiver, src);
+    /* enable RFC4588 retransmission handling by setting rtprtxreceive
+     * as the "aux" element of rtpbin */
+    g_signal_connect (src->manager, "request-aux-receiver",
+        (GCallback) request_aux_receiver, src);
+  } else {
+    GST_DEBUG_OBJECT (src,
+        "Not enabling retransmissions as no stream had a retransmission payload map");
+  }
 }
 
 /* try to get and configure a manager */
@@ -4524,7 +4560,6 @@ gst_rtspsrc_handle_data (GstRTSPSrc * src, GstRTSPMessage * message)
   guint size;
   GstBuffer *buf;
   gboolean is_rtcp;
-  GstEvent *event;
 
   channel = message->type_data.data.channel;
 
@@ -4581,15 +4616,12 @@ gst_rtspsrc_handle_data (GstRTSPSrc * src, GstRTSPMessage * message)
     gchar *uri;
     GList *streams;
     guint group_id = gst_util_group_id_next ();
-    GstSegment segment;
 
     /* generate an SHA256 sum of the URI */
     cs = g_checksum_new (G_CHECKSUM_SHA256);
     uri = src->conninfo.location;
     g_checksum_update (cs, (const guchar *) uri, strlen (uri));
 
-    gst_segment_init (&segment, GST_FORMAT_TIME);
-
     for (streams = src->streams; streams; streams = g_list_next (streams)) {
       GstRTSPStream *ostream = (GstRTSPStream *) streams->data;
       GstCaps *caps;
@@ -4630,25 +4662,16 @@ gst_rtspsrc_handle_data (GstRTSPSrc * src, GstRTSPMessage * message)
               gst_pad_send_event (ostream->channelpad[1],
                   gst_event_new_caps (caps));
           }
+
+          gst_caps_unref (caps);
         }
       }
-
-      /* Push a SEGMENT event if we don't have one pending, if we have one
-       * pending we will just send that one a few lines below to all pads
-       */
-      if (!src->start_segment)
-        gst_rtspsrc_stream_push_event (src, ostream,
-            gst_event_new_segment (&segment));
     }
     g_checksum_free (cs);
 
     gst_rtspsrc_activate_streams (src);
     src->need_activate = FALSE;
-  }
-
-  if ((event = src->start_segment) != NULL) {
-    src->start_segment = NULL;
-    gst_rtspsrc_push_event (src, event);
+    src->need_segment = TRUE;
   }
 
   if (src->base_time == -1) {
@@ -4675,6 +4698,15 @@ gst_rtspsrc_handle_data (GstRTSPSrc * src, GstRTSPMessage * message)
     GST_OBJECT_UNLOCK (src);
   }
 
+  /* If needed send a new segment, don't forget we are live and buffer are
+   * timestamped with running time */
+  if (src->need_segment) {
+    GstSegment segment;
+    src->need_segment = FALSE;
+    gst_segment_init (&segment, GST_FORMAT_TIME);
+    gst_rtspsrc_push_event (src, gst_event_new_segment (&segment));
+  }
+
   if (stream->discont && !is_rtcp) {
     /* mark first RTP buffer as discont */
     GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT);
@@ -5173,7 +5205,7 @@ gst_rtspsrc_loop_send_cmd (GstRTSPSrc * src, gint cmd, gint mask)
   /* start new request */
   gst_rtspsrc_loop_start_cmd (src, cmd);
 
-  GST_DEBUG_OBJECT (src, "sending cmd %d", cmd);
+  GST_DEBUG_OBJECT (src, "sending cmd %s", cmd_to_string (cmd));
 
   GST_OBJECT_LOCK (src);
   old = src->pending_cmd;
@@ -5185,18 +5217,20 @@ gst_rtspsrc_loop_send_cmd (GstRTSPSrc * src, gint cmd, gint mask)
     src->pending_cmd = CMD_WAIT;
     GST_OBJECT_UNLOCK (src);
     /* cancel previous request */
-    GST_DEBUG_OBJECT (src, "cancel previous request %d", old);
+    GST_DEBUG_OBJECT (src, "cancel previous request %s", cmd_to_string (old));
     gst_rtspsrc_loop_cancel_cmd (src, old);
     GST_OBJECT_LOCK (src);
   }
   src->pending_cmd = cmd;
   /* interrupt if allowed */
   if (src->busy_cmd & mask) {
-    GST_DEBUG_OBJECT (src, "connection flush busy %d", src->busy_cmd);
+    GST_DEBUG_OBJECT (src, "connection flush busy %s",
+        cmd_to_string (src->busy_cmd));
     gst_rtspsrc_connection_flush (src, TRUE);
     flushed = TRUE;
   } else {
-    GST_DEBUG_OBJECT (src, "not interrupting busy cmd %d", src->busy_cmd);
+    GST_DEBUG_OBJECT (src, "not interrupting busy cmd %s",
+        cmd_to_string (src->busy_cmd));
   }
   if (src->task)
     gst_task_start (src->task);
@@ -7516,9 +7550,7 @@ gst_rtspsrc_play (GstRTSPSrc * src, GstSegment * segment, gboolean async)
       gst_rtsp_message_take_header (&request, GST_RTSP_HDR_RANGE, hval);
 
       /* store the newsegment event so it can be sent from the streaming thread. */
-      if (src->start_segment)
-        gst_event_unref (src->start_segment);
-      src->start_segment = gst_event_new_segment (segment);
+      src->need_segment = TRUE;
     }
 
     if (segment->rate != 1.0) {
@@ -7883,7 +7915,7 @@ gst_rtspsrc_thread (GstRTSPSrc * src)
     src->pending_cmd = CMD_LOOP;
   else
     src->pending_cmd = CMD_WAIT;
-  GST_DEBUG_OBJECT (src, "got command %d", cmd);
+  GST_DEBUG_OBJECT (src, "got command %s", cmd_to_string (cmd));
 
   /* we got the message command, so ensure communication is possible again */
   gst_rtspsrc_connection_flush (src, FALSE);
diff --git a/gst/rtsp/gstrtspsrc.h b/gst/rtsp/gstrtspsrc.h
index 3d94dbb4a5ca43b3325c69176239689ef9d264ec..730ea97953b6748d92b7d1152b751fe21e94996e 100644
--- a/gst/rtsp/gstrtspsrc.h
+++ b/gst/rtsp/gstrtspsrc.h
@@ -185,7 +185,7 @@ struct _GstRTSPSrc {
   gboolean         need_range;
   gboolean         skip;
   gint             free_channel;
-  GstEvent        *start_segment;
+  gboolean         need_segment;
   GstClockTime     base_time;
 
   /* UDP mode loop */
diff --git a/gst/shapewipe/Makefile.am b/gst/shapewipe/Makefile.am
index 76758ea67763f91d7bf4a5ab0976a16632d00926..6af16621c49d87c55c97d48e49e39ec4789e7167 100644
--- a/gst/shapewipe/Makefile.am
+++ b/gst/shapewipe/Makefile.am
@@ -8,18 +8,3 @@ libgstshapewipe_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstshapewipe_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstshapewipe.h
-
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstshapewhipe -:SHARED libgstshapewhipe \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstshapewhipe_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstshapewhipe_la_CFLAGS) \
-	 -:LDFLAGS $(libgstshapewhipe_la_LDFLAGS) \
-	           $(libgstshapewhipe_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/shapewipe/Makefile.in b/gst/shapewipe/Makefile.in
index ef7b160e63bcc8f052a28ea874fe828e68cfaa13..1f2f0be7d95f13624a2f54311934f25e1a0e35d3 100644
--- a/gst/shapewipe/Makefile.in
+++ b/gst/shapewipe/Makefile.in
@@ -882,20 +882,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstshapewhipe -:SHARED libgstshapewhipe \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstshapewhipe_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstshapewhipe_la_CFLAGS) \
-	 -:LDFLAGS $(libgstshapewhipe_la_LDFLAGS) \
-	           $(libgstshapewhipe_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/smpte/Makefile.am b/gst/smpte/Makefile.am
index 22a19fe06525c0ca3f95a79dcfb55d8396bf34c4..b104134cc7b667c8d032cbfd2177a00d9ed9d902 100644
--- a/gst/smpte/Makefile.am
+++ b/gst/smpte/Makefile.am
@@ -9,17 +9,3 @@ libgstsmpte_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(LIBM) \
 			-lgstvideo-$(GST_API_VERSION) 
 libgstsmpte_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstsmpte_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstsmpte -:SHARED libgstsmpte \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsmpte_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsmpte_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsmpte_la_LDFLAGS) \
-	           $(libgstsmpte_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/smpte/Makefile.in b/gst/smpte/Makefile.in
index d5e66fb15a2760f5de494618aa92eac7a13ba312..ec2275168f316f5841ef856dc9557d59c9f80ab4 100644
--- a/gst/smpte/Makefile.in
+++ b/gst/smpte/Makefile.in
@@ -927,20 +927,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstsmpte -:SHARED libgstsmpte \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsmpte_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsmpte_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsmpte_la_LDFLAGS) \
-	           $(libgstsmpte_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/smpte/gstsmpte.c b/gst/smpte/gstsmpte.c
index a423b808529015433ff30346f2cb96048658c3dc..722f146a307ce9a73c8e80c73f89f283691e2aa9 100644
--- a/gst/smpte/gstsmpte.c
+++ b/gst/smpte/gstsmpte.c
@@ -94,8 +94,7 @@ enum
   PROP_BORDER,
   PROP_DEPTH,
   PROP_DURATION,
-  PROP_INVERT,
-  PROP_LAST,
+  PROP_INVERT
 };
 
 /* FIXME: should use video meta etc. */
diff --git a/gst/smpte/gstsmpte.h b/gst/smpte/gstsmpte.h
index 59a48305c7b7cb0f2f95708e42a0bcbb680b0f9e..3039942e4d2673435ec35b96c1e790468af12d2e 100644
--- a/gst/smpte/gstsmpte.h
+++ b/gst/smpte/gstsmpte.h
@@ -61,10 +61,8 @@ struct _GstSMPTE {
   gboolean       invert;
 
   /* negotiated format */
-  gint           format;
   gint           width;
   gint           height;
-  gdouble        fps;
   gint           fps_num;
   gint           fps_denom;
   GstVideoInfo   vinfo1;
diff --git a/gst/smpte/gstsmptealpha.c b/gst/smpte/gstsmptealpha.c
index ba934ac7a25734bbb9db4aa28160b53d5f758d4c..38e1d6c68327219600b67ae2eb37b0db19898b42 100644
--- a/gst/smpte/gstsmptealpha.c
+++ b/gst/smpte/gstsmptealpha.c
@@ -94,8 +94,7 @@ enum
   PROP_BORDER,
   PROP_DEPTH,
   PROP_POSITION,
-  PROP_INVERT,
-  PROP_LAST,
+  PROP_INVERT
 };
 
 #define AYUV_SIZE(w,h)     ((w) * (h) * 4)
diff --git a/gst/spectrum/Makefile.am b/gst/spectrum/Makefile.am
index 2f465ca38d2adf11154976d5aa9817133217cfbf..22633f8355009fd1b0b93d3620328b4bec625c55 100644
--- a/gst/spectrum/Makefile.am
+++ b/gst/spectrum/Makefile.am
@@ -10,18 +10,3 @@ libgstspectrum_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstspectrum_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstspectrum.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstspectrum -:SHARED libgstspectrum \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstspectrum_la_SOURCES) \
-	 	   $(nodist_libgstspectrum_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstspectrum_la_CFLAGS) \
-	 -:LDFLAGS $(libgstspectrum_la_LDFLAGS) \
-	           $(libgstspectrum_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/spectrum/Makefile.in b/gst/spectrum/Makefile.in
index 5089ba55e7ca743a876df41c099f966d667b902d..f799b1f882662e382bf413f55d7d85715674498e 100644
--- a/gst/spectrum/Makefile.in
+++ b/gst/spectrum/Makefile.in
@@ -888,21 +888,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstspectrum -:SHARED libgstspectrum \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstspectrum_la_SOURCES) \
-	 	   $(nodist_libgstspectrum_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstspectrum_la_CFLAGS) \
-	 -:LDFLAGS $(libgstspectrum_la_LDFLAGS) \
-	           $(libgstspectrum_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/udp/Makefile.am b/gst/udp/Makefile.am
index 7c109d5bd2c4f1bfb92eda548f2f3be2bd272d5b..74579cd341f0ac9505de09cedf6b4972c2db500c 100644
--- a/gst/udp/Makefile.am
+++ b/gst/udp/Makefile.am
@@ -12,18 +12,3 @@ noinst_HEADERS = gstudpsink.h gstudpsrc.h gstmultiudpsink.h gstdynudpsink.h gstu
 EXTRA_DIST = README
 
 CLEANFILES = $(BUILT_SOURCES)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstudp -:SHARED libgstudp \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstudp_la_SOURCES) \
-	 	   $(nodist_libgstudp_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstudp_la_CFLAGS) \
-	 -:LDFLAGS $(libgstudp_la_LDFLAGS) \
-	           $(libgstudp_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/udp/Makefile.in b/gst/udp/Makefile.in
index d26f1806473940e38a75c1158895ca6c7a990146..9fc150cc7bdf16638796d2da9bcd9aeb3d342bfb 100644
--- a/gst/udp/Makefile.in
+++ b/gst/udp/Makefile.in
@@ -929,21 +929,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstudp -:SHARED libgstudp \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstudp_la_SOURCES) \
-	 	   $(nodist_libgstudp_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstudp_la_CFLAGS) \
-	 -:LDFLAGS $(libgstudp_la_LDFLAGS) \
-	           $(libgstudp_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/udp/gstmultiudpsink.c b/gst/udp/gstmultiudpsink.c
index c81dc620a6ac52166fc9743e740fb10027d6c8c0..2f1a8ec784f897325707becd56da7f3a7ee09516 100644
--- a/gst/udp/gstmultiudpsink.c
+++ b/gst/udp/gstmultiudpsink.c
@@ -112,8 +112,7 @@ enum
   PROP_SEND_DUPLICATES,
   PROP_BUFFER_SIZE,
   PROP_BIND_ADDRESS,
-  PROP_BIND_PORT,
-  PROP_LAST
+  PROP_BIND_PORT
 };
 
 static void gst_multiudpsink_finalize (GObject * object);
diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c
index 81cb1f1e68df6f45df188534a8f910206b9aad23..6e3126f7a962ca16e17c0482241c581a2b7002f7 100644
--- a/gst/udp/gstudpsrc.c
+++ b/gst/udp/gstudpsrc.c
@@ -173,9 +173,7 @@ enum
   PROP_USED_SOCKET,
   PROP_AUTO_MULTICAST,
   PROP_REUSE,
-  PROP_ADDRESS,
-
-  PROP_LAST
+  PROP_ADDRESS
 };
 
 static void gst_udpsrc_uri_handler_init (gpointer g_iface, gpointer iface_data);
diff --git a/gst/videobox/Makefile.am b/gst/videobox/Makefile.am
index 32e1c5d25c531679d16fafa86534050b4c2dccf1..5a945624a87f34f6f85f37c06935d11a9d354914 100644
--- a/gst/videobox/Makefile.am
+++ b/gst/videobox/Makefile.am
@@ -19,18 +19,3 @@ libgstvideobox_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstvideobox.h
 EXTRA_DIST += README
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideobox -:SHARED libgstvideobox \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideobox_la_SOURCES) \
-	 	   $(nodist_libgstvideobox_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideobox_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideobox_la_LDFLAGS) \
-	           $(libgstvideobox_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/videobox/Makefile.in b/gst/videobox/Makefile.in
index 8722caca3b8cc67e7d68d32aab4069625b0becb6..2042107ba0dcbb86624c853616434e9d03bac7af 100644
--- a/gst/videobox/Makefile.in
+++ b/gst/videobox/Makefile.in
@@ -983,21 +983,6 @@ dist-hook-orc: tmp-orc.c $(ORC_SOURCE).h
 	cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c
 	cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideobox -:SHARED libgstvideobox \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideobox_la_SOURCES) \
-	 	   $(nodist_libgstvideobox_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideobox_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideobox_la_LDFLAGS) \
-	           $(libgstvideobox_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/videocrop/Makefile.am b/gst/videocrop/Makefile.am
index 8491444d24f08a302ce867b9a55fd733da55a6fe..a9b69cb471e15e6de926ab28597f75b2ab445a38 100644
--- a/gst/videocrop/Makefile.am
+++ b/gst/videocrop/Makefile.am
@@ -11,18 +11,3 @@ libgstvideocrop_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstvideocrop_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstvideocrop.h gstaspectratiocrop.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideocrop -:SHARED libgstvideocrop \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideocrop_la_SOURCES) \
-	 	   $(nodist_libgstvideocrop_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideocrop_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideocrop_la_LDFLAGS) \
-	           $(libgstvideocrop_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/videocrop/Makefile.in b/gst/videocrop/Makefile.in
index 2893eb389cef5e4285c6940e17baa7c69490f0bf..9ae403eca5acf7f63661fce7b24abad212fff6f5 100644
--- a/gst/videocrop/Makefile.in
+++ b/gst/videocrop/Makefile.in
@@ -896,21 +896,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideocrop -:SHARED libgstvideocrop \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideocrop_la_SOURCES) \
-	 	   $(nodist_libgstvideocrop_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideocrop_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideocrop_la_LDFLAGS) \
-	           $(libgstvideocrop_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/videocrop/gstaspectratiocrop.c b/gst/videocrop/gstaspectratiocrop.c
index 62e96441d7d7034bed9fcfd5d192c95a133eb752..10d0499aa8164d53cb6672134062672aa52b793a 100644
--- a/gst/videocrop/gstaspectratiocrop.c
+++ b/gst/videocrop/gstaspectratiocrop.c
@@ -50,8 +50,8 @@ GST_DEBUG_CATEGORY_STATIC (aspect_ratio_crop_debug);
 
 enum
 {
-  ARG_0,
-  ARG_ASPECT_RATIO_CROP,
+  PROP_0,
+  PROP_ASPECT_RATIO_CROP,
 };
 
 /* we support the same caps as videocrop (sync changes) */
@@ -183,7 +183,7 @@ gst_aspect_ratio_crop_class_init (GstAspectRatioCropClass * klass)
   gobject_class->get_property = gst_aspect_ratio_crop_get_property;
   gobject_class->finalize = gst_aspect_ratio_crop_finalize;
 
-  g_object_class_install_property (gobject_class, ARG_ASPECT_RATIO_CROP,
+  g_object_class_install_property (gobject_class, PROP_ASPECT_RATIO_CROP,
       gst_param_spec_fraction ("aspect-ratio", "aspect-ratio",
           "Target aspect-ratio of video", 0, 1, G_MAXINT, 1, 0, 1,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
@@ -448,7 +448,7 @@ gst_aspect_ratio_crop_set_property (GObject * object, guint prop_id,
 
   GST_OBJECT_LOCK (aspect_ratio_crop);
   switch (prop_id) {
-    case ARG_ASPECT_RATIO_CROP:
+    case PROP_ASPECT_RATIO_CROP:
       if (GST_VALUE_HOLDS_FRACTION (value)) {
         aspect_ratio_crop->ar_num = gst_value_get_fraction_numerator (value);
         aspect_ratio_crop->ar_denom =
@@ -479,7 +479,7 @@ gst_aspect_ratio_crop_get_property (GObject * object, guint prop_id,
 
   GST_OBJECT_LOCK (aspect_ratio_crop);
   switch (prop_id) {
-    case ARG_ASPECT_RATIO_CROP:
+    case PROP_ASPECT_RATIO_CROP:
       gst_value_set_fraction (value, aspect_ratio_crop->ar_num,
           aspect_ratio_crop->ar_denom);
       break;
diff --git a/gst/videocrop/gstvideocrop.c b/gst/videocrop/gstvideocrop.c
index 46e44833d566362722915d6b06fc07a811194431..99360d5dd99f04f60934b81306e0d86559e2e42b 100644
--- a/gst/videocrop/gstvideocrop.c
+++ b/gst/videocrop/gstvideocrop.c
@@ -70,11 +70,11 @@ GST_DEBUG_CATEGORY_STATIC (videocrop_debug);
 
 enum
 {
-  ARG_0,
-  ARG_LEFT,
-  ARG_RIGHT,
-  ARG_TOP,
-  ARG_BOTTOM
+  PROP_0,
+  PROP_LEFT,
+  PROP_RIGHT,
+  PROP_TOP,
+  PROP_BOTTOM
 };
 
 /* we support the same caps as aspectratiocrop (sync changes) */
@@ -177,19 +177,19 @@ gst_video_crop_class_init (GstVideoCropClass * klass)
   gobject_class->set_property = gst_video_crop_set_property;
   gobject_class->get_property = gst_video_crop_get_property;
 
-  g_object_class_install_property (gobject_class, ARG_LEFT,
+  g_object_class_install_property (gobject_class, PROP_LEFT,
       g_param_spec_int ("left", "Left",
           "Pixels to crop at left (-1 to auto-crop)", -1, G_MAXINT, 0,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_RIGHT,
+  g_object_class_install_property (gobject_class, PROP_RIGHT,
       g_param_spec_int ("right", "Right",
           "Pixels to crop at right (-1 to auto-crop)", -1, G_MAXINT, 0,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_TOP,
+  g_object_class_install_property (gobject_class, PROP_TOP,
       g_param_spec_int ("top", "Top",
           "Pixels to crop at top (-1 to auto-crop)", -1, G_MAXINT, 0,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gobject_class, ARG_BOTTOM,
+  g_object_class_install_property (gobject_class, PROP_BOTTOM,
       g_param_spec_int ("bottom", "Bottom",
           "Pixels to crop at bottom (-1 to auto-crop)", -1, G_MAXINT, 0,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
@@ -739,19 +739,19 @@ gst_video_crop_set_property (GObject * object, guint prop_id,
 
   GST_OBJECT_LOCK (video_crop);
   switch (prop_id) {
-    case ARG_LEFT:
+    case PROP_LEFT:
       gst_video_crop_set_crop (video_crop, g_value_get_int (value),
           &video_crop->prop_left);
       break;
-    case ARG_RIGHT:
+    case PROP_RIGHT:
       gst_video_crop_set_crop (video_crop, g_value_get_int (value),
           &video_crop->prop_right);
       break;
-    case ARG_TOP:
+    case PROP_TOP:
       gst_video_crop_set_crop (video_crop, g_value_get_int (value),
           &video_crop->prop_top);
       break;
-    case ARG_BOTTOM:
+    case PROP_BOTTOM:
       gst_video_crop_set_crop (video_crop, g_value_get_int (value),
           &video_crop->prop_bottom);
       break;
@@ -759,9 +759,9 @@ gst_video_crop_set_property (GObject * object, guint prop_id,
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
   }
-  GST_LOG_OBJECT (video_crop, "l=%d,r=%d,b=%d,t=%d",
-      video_crop->crop_left, video_crop->crop_right, video_crop->crop_bottom,
-      video_crop->crop_top);
+  GST_LOG_OBJECT (video_crop, "l=%d,r=%d,b=%d,t=%d, need_update:%d",
+      video_crop->prop_left, video_crop->prop_right, video_crop->prop_bottom,
+      video_crop->prop_top, video_crop->need_update);
 
   GST_OBJECT_UNLOCK (video_crop);
 
@@ -778,16 +778,16 @@ gst_video_crop_get_property (GObject * object, guint prop_id, GValue * value,
 
   GST_OBJECT_LOCK (video_crop);
   switch (prop_id) {
-    case ARG_LEFT:
+    case PROP_LEFT:
       g_value_set_int (value, video_crop->prop_left);
       break;
-    case ARG_RIGHT:
+    case PROP_RIGHT:
       g_value_set_int (value, video_crop->prop_right);
       break;
-    case ARG_TOP:
+    case PROP_TOP:
       g_value_set_int (value, video_crop->prop_top);
       break;
-    case ARG_BOTTOM:
+    case PROP_BOTTOM:
       g_value_set_int (value, video_crop->prop_bottom);
       break;
     default:
diff --git a/gst/videofilter/Makefile.am b/gst/videofilter/Makefile.am
index 71755e69d341c76ea2b4bc5647d8ecbcdb704f2f..a0cae46b4f38c3c566a9027d7a32c805b72adeae 100644
--- a/gst/videofilter/Makefile.am
+++ b/gst/videofilter/Makefile.am
@@ -21,18 +21,3 @@ libgstvideofilter_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 gstvideoexample.c: $(srcdir)/make_filter $(srcdir)/gstvideotemplate.c
 	$(srcdir)/make_filter Videoexample $(srcdir)/gstvideotemplate.c
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideofilter -:SHARED libgstvideofilter \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideofilter_la_SOURCES) \
-	 	   $(nodist_libgstvideofilter_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideofilter_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideofilter_la_LDFLAGS) \
-	           $(libgstvideofilter_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/videofilter/Makefile.in b/gst/videofilter/Makefile.in
index 550adc0444177e467b20a7772cf7e33817729de5..6dd29ea2d126fb95ef743a0e2eb8354c4a76840d 100644
--- a/gst/videofilter/Makefile.in
+++ b/gst/videofilter/Makefile.in
@@ -935,21 +935,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 gstvideoexample.c: $(srcdir)/make_filter $(srcdir)/gstvideotemplate.c
 	$(srcdir)/make_filter Videoexample $(srcdir)/gstvideotemplate.c
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideofilter -:SHARED libgstvideofilter \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideofilter_la_SOURCES) \
-	 	   $(nodist_libgstvideofilter_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideofilter_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideofilter_la_LDFLAGS) \
-	           $(libgstvideofilter_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/videofilter/gstvideotemplate.c b/gst/videofilter/gstvideotemplate.c
index 3d60f55503614fdac316a477f6509cb953c959d2..660526a985ceee29e7d1a561378617ec05e95d0d 100644
--- a/gst/videofilter/gstvideotemplate.c
+++ b/gst/videofilter/gstvideotemplate.c
@@ -68,7 +68,7 @@ enum
 
 enum
 {
-  ARG_0
+  PROP_0
       /* FILL ME */
 };
 
@@ -145,7 +145,7 @@ gst_videotemplate_class_init (gpointer g_class, gpointer class_data)
   videofilter_class = GST_VIDEOFILTER_CLASS (g_class);
 
 #if 0
-  g_object_class_install_property (gobject_class, ARG_METHOD,
+  g_object_class_install_property (gobject_class, PROP_METHOD,
       g_param_spec_enum ("method", "method", "method",
           GST_TYPE_VIDEOTEMPLATE_METHOD, GST_VIDEOTEMPLATE_METHOD_1,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
@@ -182,7 +182,7 @@ gst_videotemplate_set_property (GObject * object, guint prop_id,
   GST_DEBUG ("gst_videotemplate_set_property");
   switch (prop_id) {
 #if 0
-    case ARG_METHOD:
+    case PROP_METHOD:
       src->method = g_value_get_enum (value);
       break;
 #endif
@@ -202,7 +202,7 @@ gst_videotemplate_get_property (GObject * object, guint prop_id, GValue * value,
 
   switch (prop_id) {
 #if 0
-    case ARG_METHOD:
+    case PROP_METHOD:
       g_value_set_enum (value, src->method);
       break;
 #endif
diff --git a/gst/videomixer/Makefile.am b/gst/videomixer/Makefile.am
index f8499b61e0b2e5b75529ba6ae2a38f9206527a79..425034246ae4600af1ce54a8fb5a19e1b7aa7c7b 100644
--- a/gst/videomixer/Makefile.am
+++ b/gst/videomixer/Makefile.am
@@ -22,18 +22,3 @@ noinst_HEADERS = \
 	blend.h \
 	videomixer2.h \
 	videomixer2pad.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideomixer -:SHARED libgstvideomixer \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideomixer_la_SOURCES) \
-	 	   $(nodist_libgstvideomixer_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideomixer_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideomixer_la_LDFLAGS) \
-	           $(libgstvideomixer_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/videomixer/Makefile.in b/gst/videomixer/Makefile.in
index 3a0af1c750447c195f802d4349b3a61689ca2ce1..955512f712de23cbe8f5e1f9a8c6a991fb0c9bd4 100644
--- a/gst/videomixer/Makefile.in
+++ b/gst/videomixer/Makefile.in
@@ -997,21 +997,6 @@ dist-hook-orc: tmp-orc.c $(ORC_SOURCE).h
 	cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c
 	cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideomixer -:SHARED libgstvideomixer \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideomixer_la_SOURCES) \
-	 	   $(nodist_libgstvideomixer_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideomixer_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideomixer_la_LDFLAGS) \
-	           $(libgstvideomixer_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/videomixer/videomixerorc-dist.c b/gst/videomixer/videomixerorc-dist.c
index 7ddc1b0802aae003c8daf32f346fad87e8d5e33b..115b6fcc95018240e12d76a46179d365f986a165 100644
--- a/gst/videomixer/videomixerorc-dist.c
+++ b/gst/videomixer/videomixerorc-dist.c
@@ -1713,7 +1713,7 @@ video_mixer_orc_overlay_argb (guint8 * ORC_RESTRICT d1, int d1_stride,
       static const orc_uint8 bc[] = {
         1, 7, 9, 28, 118, 105, 100, 101, 111, 95, 109, 105, 120, 101, 114, 95,
         111, 114, 99, 95, 111, 118, 101, 114, 108, 97, 121, 95, 97, 114, 103,
-            98,
+        98,
         11, 4, 4, 12, 4, 4, 14, 4, 255, 255, 255, 255, 14, 4, 255, 0,
         0, 0, 14, 4, 0, 255, 255, 255, 14, 2, 8, 0, 0, 0, 16, 2,
         20, 4, 20, 2, 20, 1, 20, 8, 20, 8, 20, 8, 20, 4, 20, 8,
@@ -2283,7 +2283,7 @@ video_mixer_orc_overlay_bgra (guint8 * ORC_RESTRICT d1, int d1_stride,
       static const orc_uint8 bc[] = {
         1, 7, 9, 28, 118, 105, 100, 101, 111, 95, 109, 105, 120, 101, 114, 95,
         111, 114, 99, 95, 111, 118, 101, 114, 108, 97, 121, 95, 98, 103, 114,
-            97,
+        97,
         11, 4, 4, 12, 4, 4, 14, 4, 255, 255, 255, 255, 14, 4, 0, 0,
         0, 255, 14, 4, 255, 255, 255, 0, 14, 4, 24, 0, 0, 0, 14, 2,
         8, 0, 0, 0, 16, 2, 20, 4, 20, 4, 20, 2, 20, 1, 20, 8,
diff --git a/gst/wavenc/Makefile.am b/gst/wavenc/Makefile.am
index 98d6f663e9d133429991548c339f173721d3730a..a25dd319dc04a11051c7e8090d8290902d746dcf 100644
--- a/gst/wavenc/Makefile.am
+++ b/gst/wavenc/Makefile.am
@@ -15,17 +15,3 @@ libgstwavenc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstwavenc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstwavenc.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstwavenc -:SHARED libgstwavenc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstwavenc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstwavenc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstwavenc_la_LDFLAGS) \
-	           $(libgstwavenc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/wavenc/Makefile.in b/gst/wavenc/Makefile.in
index cb2f961bf931d6f648c01825f1b7039f4591ad29..bffe23a1f64c207db6736fd57269806daed2719e 100644
--- a/gst/wavenc/Makefile.in
+++ b/gst/wavenc/Makefile.in
@@ -892,20 +892,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstwavenc -:SHARED libgstwavenc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstwavenc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstwavenc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstwavenc_la_LDFLAGS) \
-	           $(libgstwavenc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/wavparse/Makefile.am b/gst/wavparse/Makefile.am
index 2a0aa40288fa1bb3589a9e99d4e9678f32d31dbd..d3f1818a320e4c3f76bb80a4247951b2702f15ff 100644
--- a/gst/wavparse/Makefile.am
+++ b/gst/wavparse/Makefile.am
@@ -17,17 +17,3 @@ libgstwavparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstwavparse_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstwavparse.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstwavparse -:SHARED libgstwavparse \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstwavparse_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstwavparse_la_CFLAGS) \
-	 -:LDFLAGS $(libgstwavparse_la_LDFLAGS) \
-	           $(libgstwavparse_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/wavparse/Makefile.in b/gst/wavparse/Makefile.in
index b54ff0f139773aad2912f2ca84e25da26c17ffe9..9c7ce5d3dc93f45892f8bad9ddf50ec0184249f9 100644
--- a/gst/wavparse/Makefile.in
+++ b/gst/wavparse/Makefile.in
@@ -895,20 +895,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstwavparse -:SHARED libgstwavparse \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstwavparse_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstwavparse_la_CFLAGS) \
-	 -:LDFLAGS $(libgstwavparse_la_LDFLAGS) \
-	           $(libgstwavparse_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c
index 41d5151549d07cf005073d9b9a19fdcd527cf789..b0e34231ae5dcffcd714a2f4062ef3cbd25895a6 100644
--- a/gst/wavparse/gstwavparse.c
+++ b/gst/wavparse/gstwavparse.c
@@ -1261,8 +1261,20 @@ gst_wavparse_stream_headers (GstWavParse * wav)
     }
 
     GST_INFO_OBJECT (wav,
-        "Got TAG: %" GST_FOURCC_FORMAT ", offset %" G_GUINT64_FORMAT,
-        GST_FOURCC_ARGS (tag), wav->offset);
+        "Got TAG: %" GST_FOURCC_FORMAT ", offset %" G_GUINT64_FORMAT ", size %"
+        G_GUINT32_FORMAT, GST_FOURCC_ARGS (tag), wav->offset, size);
+
+    /* Maximum valid size is INT_MAX */
+    if (size & 0x80000000) {
+      GST_WARNING_OBJECT (wav, "Invalid size, clipping to 0x7fffffff");
+      size = 0x7fffffff;
+    }
+
+    /* Clip to upstream size if known */
+    if (wav->datasize > 0 && size + wav->offset > wav->datasize) {
+      GST_WARNING_OBJECT (wav, "Clipping chunk size to file size");
+      size = wav->datasize - wav->offset;
+    }
 
     /* wav is a st00pid format, we don't know for sure where data starts.
      * So we have to go bit by bit until we find the 'data' header
@@ -1827,12 +1839,16 @@ gst_wavparse_have_dts_caps (const GstCaps * caps, GstTypeFindProbability prob)
   s = gst_caps_get_structure (caps, 0);
   if (!gst_structure_has_name (s, "audio/x-dts"))
     return FALSE;
-  if (prob >= GST_TYPE_FIND_LIKELY)
+  /* typefind behavior for DTS:
+   *  MAXIMUM: multiple frame syncs detected, certainly DTS
+   *  LIKELY: single frame sync at offset 0.  Maybe DTS?
+   *  POSSIBLE: single frame sync, not at offset 0.  Highly unlikely
+   *    to be DTS.  */
+  if (prob > GST_TYPE_FIND_LIKELY)
     return TRUE;
-  /* DTS at non-0 offsets and without second sync may yield POSSIBLE .. */
-  if (prob < GST_TYPE_FIND_POSSIBLE)
+  if (prob <= GST_TYPE_FIND_POSSIBLE)
     return FALSE;
-  /* .. in which case we want at least a valid-looking rate and channels */
+  /* for maybe, check for at least a valid-looking rate and channels */
   if (!gst_structure_has_field (s, "channels"))
     return FALSE;
   /* and for extra assurance we could also check the rate from the DTS frame
diff --git a/gst/y4m/Makefile.am b/gst/y4m/Makefile.am
index ae424f9d9ae1f21b7c61cbc234986ec3e8ea8202..844dadfe18adee53be0eed5a8f7a3f18945f0260 100644
--- a/gst/y4m/Makefile.am
+++ b/gst/y4m/Makefile.am
@@ -8,17 +8,3 @@ libgsty4menc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgsty4menc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gsty4mencode.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsty4menc -:SHARED libgsty4menc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsty4menc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsty4menc_la_CFLAGS) \
-	 -:LDFLAGS $(libgsty4menc_la_LDFLAGS) \
-	           $(libgsty4menc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/y4m/Makefile.in b/gst/y4m/Makefile.in
index 608bb2a83cd4465984ab58cdc8b022d7935a7f05..956ebd7f7bb28f6a2ea161563a07add6beb11afe 100644
--- a/gst/y4m/Makefile.in
+++ b/gst/y4m/Makefile.in
@@ -882,20 +882,6 @@ uninstall-am: uninstall-pluginLTLIBRARIES
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsty4menc -:SHARED libgsty4menc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsty4menc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsty4menc_la_CFLAGS) \
-	 -:LDFLAGS $(libgsty4menc_la_LDFLAGS) \
-	           $(libgsty4menc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/gst/y4m/gsty4mencode.c b/gst/y4m/gsty4mencode.c
index c4cbde6b82b9cef622e6f9a6293fc294b9bd1e92..7b39d5f8a242afb2f5cf65c6ec7f30fefbaef50c 100644
--- a/gst/y4m/gsty4mencode.c
+++ b/gst/y4m/gsty4mencode.c
@@ -56,7 +56,7 @@ enum
 
 enum
 {
-  ARG_0
+  PROP_0
 };
 
 static GstStaticPadTemplate y4mencode_src_factory =
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ccbef6f51155e10f66b2222f0ae8971112f66c59..fd21f951893a2d0ba714a475dd41073f932c0e85 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -10,6 +10,7 @@ gst/audioparsers/gstwavpackparse.c
 gst/avi/gstavidemux.c
 gst/avi/gstavimux.c
 gst/isomp4/qtdemux.c
+gst/multifile/gstsplitmuxsrc.c
 gst/rtsp/gstrtspsrc.c
 gst/wavparse/gstwavparse.c
 sys/oss4/oss4-sink.c
diff --git a/po/af.gmo b/po/af.gmo
index ea91b6525e7d4c06db1017d71429b6b5fad69ced..e28aa213037fa4cf4187af13e3e1667830e9850e 100644
Binary files a/po/af.gmo and b/po/af.gmo differ
diff --git a/po/af.po b/po/af.po
index afe7544034cf153afda734ffd1d96f12833ffaff..baa38ec06f9b7e3165b7734942d056a6f0948f72 100644
--- a/po/af.po
+++ b/po/af.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins 0.7.6\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2004-03-18 14:16+0200\n"
 "Last-Translator: Petri Jooste <rkwjpj@puk.ac.za>\n"
 "Language-Team: Afrikaans <i18n@af.org.za>\n"
@@ -86,6 +86,9 @@ msgstr ""
 msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 
+msgid "Internal data flow error."
+msgstr ""
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -97,9 +100,6 @@ msgid ""
 "plugin."
 msgstr ""
 
-msgid "Internal data flow error."
-msgstr ""
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/az.gmo b/po/az.gmo
index 2deec120bcf7e2596f8e7bdbc492a7c9ab34c39f..bdd79be51994a9c3ee75bbf4fd4da5ff06dfe7f0 100644
Binary files a/po/az.gmo and b/po/az.gmo differ
diff --git a/po/az.po b/po/az.po
index fd91884b778cf37cdff395d668351b29495940bc..77c0009f8c1555b9b7ec10780e75c8bd47d0f04f 100644
--- a/po/az.po
+++ b/po/az.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-0.8.0\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2004-03-19 18:29+0200\n"
 "Last-Translator: Metin Amiroff <metin@karegen.com>\n"
 "Language-Team: Azerbaijani <translation-team-az@lists.sourceforge.net>\n"
@@ -87,6 +87,9 @@ msgstr ""
 msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 
+msgid "Internal data flow error."
+msgstr ""
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -98,9 +101,6 @@ msgid ""
 "plugin."
 msgstr ""
 
-msgid "Internal data flow error."
-msgstr ""
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/bg.gmo b/po/bg.gmo
index eddfd9ec833f7184f3028916452456604e3b4ede..e634ee25f19a9a6d9a38a0577cca886b13ace1c4 100644
Binary files a/po/bg.gmo and b/po/bg.gmo differ
diff --git a/po/bg.po b/po/bg.po
index c9feb2112896e65d328fcfb6f897e0de60089a08..163f700985aea499bd1874ad5eed75c334f852f4 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 0.10.28.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2011-04-26 22:35+0300\n"
 "Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
 "Language-Team: Bulgarian <dict@fsa-bg.org>\n"
@@ -86,6 +86,9 @@ msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 "Този файл съдържа прекалено много потоци. Изпълняват се само първите %d"
 
+msgid "Internal data flow error."
+msgstr "Вътрешна грешка в потока с данни."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -101,9 +104,6 @@ msgstr ""
 "Не е открит поддържан поток. Може би трябва да разрешите повече транспортни "
 "протоколи или ви липсва правилната приставка на GStreamer за RTSP."
 
-msgid "Internal data flow error."
-msgstr "Вътрешна грешка в потока с данни."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/ca.gmo b/po/ca.gmo
index d6cbcd94386a310edbc6f1f136ec50ee255484c5..8c45936eb41aa955912284318ea27d494b9f1f72 100644
Binary files a/po/ca.gmo and b/po/ca.gmo differ
diff --git a/po/ca.po b/po/ca.po
index 0db48c091705e347ee977d8c46222a70c8e38df8..8a7b005d95e1f64b5303f7d6722dc99cbd485685 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 0.10.28.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2012-01-01 14:19+0100\n"
 "Last-Translator: Gil Forcada <gforcada@gnome.org>\n"
 "Language-Team: Catalan <ca@dodds.net>\n"
@@ -89,6 +89,9 @@ msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 "Aquest fitxer conté massa fluxos. Només s'estan reproduint els primers %d"
 
+msgid "Internal data flow error."
+msgstr "S'ha produït un error intern de flux de dades."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -105,9 +108,6 @@ msgstr ""
 "protocols de transport o bé potser manca el connector d'extensió RTSP del "
 "GStreamer correcte."
 
-msgid "Internal data flow error."
-msgstr "S'ha produït un error intern de flux de dades."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/cs.gmo b/po/cs.gmo
index 1bfad5939c2ca53a45b9526493b6af11e9fc005a..0d55f2a44082eb8d80211688b3dabd174db79c41 100644
Binary files a/po/cs.gmo and b/po/cs.gmo differ
diff --git a/po/cs.po b/po/cs.po
index 8ed6164b171d1f9e2f8a6ebad280f2389e4b7741..2fe592bbd58827e14dbc9c315dc846dde147e4a5 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -10,7 +10,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good-1.1.4\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2013-09-18 19:18+0200\n"
 "Last-Translator: Marek Černocký <marek@manet.cz>\n"
 "Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
@@ -88,6 +88,9 @@ msgstr "Video v tomto souboru se nemusí přehrát správně."
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Tento soubor obsahuje příliš mnoho proudů. Přehrává se pouze první %d"
 
+msgid "Internal data flow error."
+msgstr "Vnitřní chyba datového toku."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -104,9 +107,6 @@ msgstr ""
 "přenosových protokolů, jinak nejspíš bude scházet potřebný zásuvný modul "
 "rozšíření GStreamer RTSP."
 
-msgid "Internal data flow error."
-msgstr "Vnitřní chyba datového toku."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/da.gmo b/po/da.gmo
index e749006433293e70e8267be6706a9c5627aecc3d..54aae8cd41bb05ec814a6a880203b957b7316fee 100644
Binary files a/po/da.gmo and b/po/da.gmo differ
diff --git a/po/da.po b/po/da.po
index c2a4657312f576797038580530cd60482cbcfaf4..d421e029b463ad9d971bc973b45562d766edaae1 100644
--- a/po/da.po
+++ b/po/da.po
@@ -11,7 +11,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good-1.3.90\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-06-29 23:54+0200\n"
 "Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n"
 "Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
@@ -91,6 +91,9 @@ msgstr "Videoen i denne fil afspilles måske ikke korrekt."
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Denne fil indeholder for mange strømme. Afspil først kun %d"
 
+msgid "Internal data flow error."
+msgstr "Intern datastrømsfejl."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -107,9 +110,6 @@ msgstr ""
 "transportprotokoller eller mangler måske det korrekte udvidelsesmodul til "
 "GStreamer RTSP."
 
-msgid "Internal data flow error."
-msgstr "Intern datastrømsfejl."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/de.gmo b/po/de.gmo
index 33a2d187b23cd8c84f9e25933f71f7836527cf97..a83cb8d67b21fbe658eae35216ed45294b61c7c8 100644
Binary files a/po/de.gmo and b/po/de.gmo differ
diff --git a/po/de.po b/po/de.po
index 7cfb10036f11eeafffb1dc37e4b9c40bdb041d99..4516c4301a4395a04d13029142786b76a76cd935 100644
--- a/po/de.po
+++ b/po/de.po
@@ -14,7 +14,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 1.3.90\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-06-29 21:20+0100\n"
 "Last-Translator: Christian Kirbach <christian.kirbach@gmail.com>\n"
 "Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
@@ -98,6 +98,9 @@ msgstr ""
 "Diese Datei enthält zu viele Ströme. Es werden nur die ersten %d "
 "wiedergegeben"
 
+msgid "Internal data flow error."
+msgstr "Interner Datenstromfehler."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -114,9 +117,6 @@ msgstr ""
 "Transport-Protokolle erlauben oder es fehlt vielleicht das richtige Plugin "
 "zur RTSP-Erweiterung."
 
-msgid "Internal data flow error."
-msgstr "Interner Datenstromfehler."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/el.gmo b/po/el.gmo
index eb7c98b0488f647bef39200e26c81679e3012f1f..9dfbe1ad79f99216df83800d0c6953fed7a163c0 100644
Binary files a/po/el.gmo and b/po/el.gmo differ
diff --git a/po/el.po b/po/el.po
index 76c0937d276dd4bf6e6ce5ef44421be86fa0d03b..1957ae76c61b851e60cf148f4101bd91f6106e94 100644
--- a/po/el.po
+++ b/po/el.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 0.10.28.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2012-05-05 19:05+0100\n"
 "Last-Translator: Savvas Radevic <vicedar@gmail.com>\n"
 "Language-Team: Greek <team@lists.gnome.gr>\n"
@@ -87,6 +87,9 @@ msgstr "Το βίντεο σε αυτό το αρχείο μπορεί να μη
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Αυτό το αρχείο περιέχει πολλές ροές. Αναπαράγεται μόνο η πρώτη %d"
 
+msgid "Internal data flow error."
+msgstr "Εσωτερικό σφάλμα ροής δεδομένων."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -103,9 +106,6 @@ msgstr ""
 "επιτρέψετε περισσότερα πρωτόκολλα μεταγωγής ή αλλιώς να σας λείπει το σωστό "
 "πρόσθετο RTSP του GStreamer."
 
-msgid "Internal data flow error."
-msgstr "Εσωτερικό σφάλμα ροής δεδομένων."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/en_GB.gmo b/po/en_GB.gmo
index 87d70e21dac421f81a62428bf5727f2cbb4b9902..f4bf50a58eeb9754076e8e8ec84a864edecc67f9 100644
Binary files a/po/en_GB.gmo and b/po/en_GB.gmo differ
diff --git a/po/en_GB.po b/po/en_GB.po
index 683a69bc1cc60de54a80dca7786f48019b6a53da..1634c8357b4242e204b03cbacffdfe67433ce25f 100644
--- a/po/en_GB.po
+++ b/po/en_GB.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins 0.8.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2004-04-26 10:41-0400\n"
 "Last-Translator: Gareth Owen <gowen72@yahoo.com>\n"
 "Language-Team: English (British) <en_gb@li.org>\n"
@@ -86,6 +86,9 @@ msgstr ""
 msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 
+msgid "Internal data flow error."
+msgstr ""
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -97,9 +100,6 @@ msgid ""
 "plugin."
 msgstr ""
 
-msgid "Internal data flow error."
-msgstr ""
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/eo.gmo b/po/eo.gmo
index 0f1a262d643da4339415e899007122af3d16067d..dc2ff7719886725230bbbbd5645c88d3a8d17b3c 100644
Binary files a/po/eo.gmo and b/po/eo.gmo differ
diff --git a/po/eo.po b/po/eo.po
index fc3cd03badac84dcf25382d63e0f60f88de52961..2247ca985981af655810c720d10c6b0fddc90aa7 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 0.10.28.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2011-06-04 21:48+0100\n"
 "Last-Translator: Kristjan SCHMIDT <kristjan.schmidt@googlemail.com>\n"
 "Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
@@ -84,6 +84,9 @@ msgstr ""
 msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 
+msgid "Internal data flow error."
+msgstr ""
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -95,9 +98,6 @@ msgid ""
 "plugin."
 msgstr ""
 
-msgid "Internal data flow error."
-msgstr ""
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/es.gmo b/po/es.gmo
index d9efa5021e672794d7c1e512315046ffe25bf579..e02f4c86542c9072755c0f1dbc30edb642293622 100644
Binary files a/po/es.gmo and b/po/es.gmo differ
diff --git a/po/es.po b/po/es.po
index 3aef96a93c1396e3e8bf72d29499d2e313e2c966..3a0887ce14ceedf12ddf9d82c874ca54a74120ed 100644
--- a/po/es.po
+++ b/po/es.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 0.10.26.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2011-02-12 18:30+0100\n"
 "Last-Translator: Jorge González González <aloriel@gmail.com>\n"
 "Language-Team: Spanish <es@li.org>\n"
@@ -88,6 +88,9 @@ msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 "Este archivo contiene demasiados flujos. Sólo se reproducirá el primer %d"
 
+msgid "Internal data flow error."
+msgstr "Error en el flujo de datos interno."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -104,9 +107,6 @@ msgstr ""
 "protocolos de transporte o de otra forma puede que le falte la extensión "
 "correcta de RTSP de GStreamer."
 
-msgid "Internal data flow error."
-msgstr "Error en el flujo de datos interno."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/eu.gmo b/po/eu.gmo
index 6de8c1c5a8f81af436798d722200be05c543950f..df8ab281c83b5194545b59010734e67a18bc5b09 100644
Binary files a/po/eu.gmo and b/po/eu.gmo differ
diff --git a/po/eu.po b/po/eu.po
index 354e43773554480a08c7bf2c6f2524a41ad43256..96459666140e7ae770cc1dca519c57a1c291afa4 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good-0.10.18.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2010-03-25 12:37+0100\n"
 "Last-Translator: Mikel Olasagasti Uranga <hey_neken@mundurat.net>\n"
 "Language-Team: Basque <translation-team-eu@lists.sourceforge.net>\n"
@@ -92,6 +92,9 @@ msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 "Fitxategi horrek korronte gehiegi ditu. Erreproduzitu soilik lehen %d(r)ak"
 
+msgid "Internal data flow error."
+msgstr "Datu-fluxuaren barne-errorea."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -107,9 +110,6 @@ msgstr ""
 "Ez da onartutako korronterik aurkitu. Garraioko protokolo gehiago baimentzea "
 "behar da edo GStreamer RTSP hedapen egokia falta zaizu."
 
-msgid "Internal data flow error."
-msgstr "Datu-fluxuaren barne-errorea."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/fi.gmo b/po/fi.gmo
index a0642ca17d59df8d5cb858ee108e99843c6b2291..8e935b0b1486e71b60315334a8f9406a951f2b84 100644
Binary files a/po/fi.gmo and b/po/fi.gmo differ
diff --git a/po/fi.po b/po/fi.po
index 55b7f55db4662d996274c9458f645443e54acea4..00753143e489ed90c6c6c0c54f2a02551fc8c972 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -11,7 +11,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 0.10.25.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2010-11-17 23:03+0200\n"
 "Last-Translator: Tommi Vainikainen <Tommi.Vainikainen@iki.fi>\n"
 "Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
@@ -90,6 +90,9 @@ msgstr "Tiedostossa olevaa videota ei ehkä voida näyttää oikein."
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Tiedosto sisältää useita virtoja. Soitetaan vain ensimmäiset %d"
 
+msgid "Internal data flow error."
+msgstr "Sisäisen tietovirran virhe."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -106,9 +109,6 @@ msgstr ""
 "siirtoprotokollia, tai vaihtoehtoisesti sinulta saattaa puuttua oikea "
 "GStreamer-RTSP-laajennusliitännäinen."
 
-msgid "Internal data flow error."
-msgstr "Sisäisen tietovirran virhe."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/fr.gmo b/po/fr.gmo
index 5d6a39f5de549913a5a8d5b128e18122ca67a3b2..fdd13459b11a127b44e941b8f57c1e871d9dd7e8 100644
Binary files a/po/fr.gmo and b/po/fr.gmo differ
diff --git a/po/fr.po b/po/fr.po
index 70342fd98acbb9a8f26dd284547203fa45a3663c..cf5554fc97695ee0f2247e8e736edcf865bb6f76 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 0.10.28.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2011-04-28 09:22+0200\n"
 "Last-Translator: Claude Paroz <claude@2xlibre.net>\n"
 "Language-Team: French <traduc@traduc.org>\n"
@@ -89,6 +89,9 @@ msgstr ""
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Ce fichier contient trop de flux. Seuls les %d premiers seront lus."
 
+msgid "Internal data flow error."
+msgstr "Erreur interne de flux de données."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -105,9 +108,6 @@ msgstr ""
 "davantage de protocoles de transport ou il manque peut-être le bon greffon "
 "d'extension GStreamer RTSP."
 
-msgid "Internal data flow error."
-msgstr "Erreur interne de flux de données."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/gl.gmo b/po/gl.gmo
index 00208f30e4cfc03ce2e781f9426a45f2dc314d56..933806d4eb675e0ae37223aea466fa2318bf3850 100644
Binary files a/po/gl.gmo and b/po/gl.gmo differ
diff --git a/po/gl.po b/po/gl.po
index 2a0148543aee4981780cad77185b2533c47264e1..9b9ce589273f1d001fdfaf2f1b3ffeebcce7da70 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 1.0.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2012-12-15 03:46+0200\n"
 "Last-Translator: Fran Dieguez <frandieguez@ubuntu.com>\n"
 "Language-Team: Galician <proxecto@trasno.net>\n"
@@ -89,6 +89,9 @@ msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 "Este ficheiro contén demasiados fluxos. Só se reproducirá o primeiro %d"
 
+msgid "Internal data flow error."
+msgstr "Produciuse un erro interno no fluxo de datos."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -105,9 +108,6 @@ msgstr ""
 "protocolos de transporte ou de outra forma pode que lle falte a extensión "
 "correcta de RTSP de GStreamer."
 
-msgid "Internal data flow error."
-msgstr "Produciuse un erro interno no fluxo de datos."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/gst-plugins-good-1.0.pot b/po/gst-plugins-good-1.0.pot
index b5e9e0200f1df93b0ab76b44e2fae98678542aa4..033c31a6cd2b18f7fdeddda5b27b9d2ca3a8dc22 100644
--- a/po/gst-plugins-good-1.0.pot
+++ b/po/gst-plugins-good-1.0.pot
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 1.5.0.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -20,10 +20,10 @@ msgstr ""
 msgid "Jack server not found"
 msgstr ""
 
-#: ext/jpeg/gstjpegdec.c:921 ext/jpeg/gstjpegdec.c:1169
-#: ext/jpeg/gstjpegdec.c:1181 ext/jpeg/gstjpegdec.c:1209
-#: ext/jpeg/gstjpegdec.c:1218 ext/jpeg/gstjpegdec.c:1227
-#: ext/jpeg/gstjpegdec.c:1235
+#: ext/jpeg/gstjpegdec.c:921 ext/jpeg/gstjpegdec.c:1174
+#: ext/jpeg/gstjpegdec.c:1186 ext/jpeg/gstjpegdec.c:1215
+#: ext/jpeg/gstjpegdec.c:1224 ext/jpeg/gstjpegdec.c:1233
+#: ext/jpeg/gstjpegdec.c:1241
 msgid "Failed to decode JPEG image"
 msgstr ""
 
@@ -78,56 +78,56 @@ msgstr ""
 msgid "This file contains no playable streams."
 msgstr ""
 
-#: gst/isomp4/qtdemux.c:649 gst/isomp4/qtdemux.c:5039
-#: gst/isomp4/qtdemux.c:5106 gst/isomp4/qtdemux.c:5345
+#: gst/isomp4/qtdemux.c:649 gst/isomp4/qtdemux.c:5060
+#: gst/isomp4/qtdemux.c:5127 gst/isomp4/qtdemux.c:5365
 msgid "This file is invalid and cannot be played."
 msgstr ""
 
-#: gst/isomp4/qtdemux.c:2324
+#: gst/isomp4/qtdemux.c:2329
 msgid "Cannot play stream because it is encrypted with PlayReady DRM."
 msgstr ""
 
-#: gst/isomp4/qtdemux.c:3028 gst/isomp4/qtdemux.c:6044
-#: gst/isomp4/qtdemux.c:6051 gst/isomp4/qtdemux.c:6705
-#: gst/isomp4/qtdemux.c:7132 gst/isomp4/qtdemux.c:7139
-#: gst/isomp4/qtdemux.c:9256
+#: gst/isomp4/qtdemux.c:3033 gst/isomp4/qtdemux.c:6072
+#: gst/isomp4/qtdemux.c:6079 gst/isomp4/qtdemux.c:6736
+#: gst/isomp4/qtdemux.c:7163 gst/isomp4/qtdemux.c:7170
+#: gst/isomp4/qtdemux.c:9287
 msgid "This file is corrupt and cannot be played."
 msgstr ""
 
-#: gst/isomp4/qtdemux.c:3261
+#: gst/isomp4/qtdemux.c:3275
 msgid "Invalid atom size."
 msgstr ""
 
-#: gst/isomp4/qtdemux.c:3337
+#: gst/isomp4/qtdemux.c:3351
 msgid "This file is incomplete and cannot be played."
 msgstr ""
 
-#: gst/isomp4/qtdemux.c:7908
+#: gst/isomp4/qtdemux.c:7939
 msgid "The video in this file might not play correctly."
 msgstr ""
 
-#: gst/isomp4/qtdemux.c:9297
+#: gst/isomp4/qtdemux.c:9328
 #, c-format
 msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 
-#: gst/rtsp/gstrtspsrc.c:6665
+#: gst/multifile/gstsplitmuxsrc.c:548 gst/wavparse/gstwavparse.c:2248
+msgid "Internal data flow error."
+msgstr ""
+
+#: gst/rtsp/gstrtspsrc.c:6699
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
 msgstr ""
 
-#: gst/rtsp/gstrtspsrc.c:6670
+#: gst/rtsp/gstrtspsrc.c:6704
 msgid ""
 "No supported stream was found. You might need to allow more transport "
 "protocols or may otherwise be missing the right GStreamer RTSP extension "
 "plugin."
 msgstr ""
 
-#: gst/wavparse/gstwavparse.c:2232
-msgid "Internal data flow error."
-msgstr ""
-
 #: sys/oss4/oss4-sink.c:493 sys/oss4/oss4-source.c:358
 #: sys/oss/gstosssink.c:384
 msgid ""
@@ -251,85 +251,85 @@ msgstr ""
 msgid "AUX 2 Out"
 msgstr ""
 
-#: sys/v4l2/gstv4l2bufferpool.c:1648
+#: sys/v4l2/gstv4l2bufferpool.c:1657
 #, c-format
 msgid "Error reading %d bytes from device '%s'."
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:1064
+#: sys/v4l2/gstv4l2object.c:1086
 #, c-format
 msgid "Failed to enumerate possible video formats device '%s' can work with"
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:2424
+#: sys/v4l2/gstv4l2object.c:2453
 #, c-format
 msgid "Could not map buffers from device '%s'"
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:2432
+#: sys/v4l2/gstv4l2object.c:2461
 #, c-format
 msgid "The driver of device '%s' does not support the IO method %d"
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:2439
+#: sys/v4l2/gstv4l2object.c:2468
 #, c-format
 msgid "The driver of device '%s' does not support any known IO method."
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:2945 sys/v4l2/gstv4l2object.c:2956
+#: sys/v4l2/gstv4l2object.c:2974 sys/v4l2/gstv4l2object.c:2985
 #, c-format
 msgid "Device '%s' is busy"
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:2962 sys/v4l2/gstv4l2object.c:2974
+#: sys/v4l2/gstv4l2object.c:2991 sys/v4l2/gstv4l2object.c:3003
 #, c-format
 msgid "Device '%s' cannot capture at %dx%d"
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:2985
+#: sys/v4l2/gstv4l2object.c:3014
 #, c-format
 msgid "Device '%s' cannot capture in the specified format"
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:2998
+#: sys/v4l2/gstv4l2object.c:3027
 #, c-format
 msgid "Device '%s' does support non-contiguous planes"
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:3009
+#: sys/v4l2/gstv4l2object.c:3038
 #, c-format
 msgid "Could not get parameters on device '%s'"
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:3017
+#: sys/v4l2/gstv4l2object.c:3046
 msgid "Video device did not accept new frame rate setting."
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:3122
+#: sys/v4l2/gstv4l2object.c:3151
 msgid "Video device did not provide output format."
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:3128
+#: sys/v4l2/gstv4l2object.c:3157
 msgid "Video device returned invalid dimensions."
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:3136
+#: sys/v4l2/gstv4l2object.c:3165
 msgid "Video devices uses an unsupported interlacing method."
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:3143
+#: sys/v4l2/gstv4l2object.c:3172
 msgid "Video devices uses an unsupported pixel format."
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:3565
+#: sys/v4l2/gstv4l2object.c:3584
 msgid "Failed to configure internal buffer pool."
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:3571
+#: sys/v4l2/gstv4l2object.c:3590
 msgid "Video device did not suggest any buffer size."
 msgstr ""
 
-#: sys/v4l2/gstv4l2object.c:3586
+#: sys/v4l2/gstv4l2object.c:3605
 msgid "No downstream pool to import from."
 msgstr ""
 
@@ -367,7 +367,7 @@ msgstr ""
 msgid "Failed to allocated required memory."
 msgstr ""
 
-#: sys/v4l2/gstv4l2src.c:509 sys/v4l2/gstv4l2videodec.c:581
+#: sys/v4l2/gstv4l2src.c:510 sys/v4l2/gstv4l2videodec.c:581
 msgid "Failed to allocate required memory."
 msgstr ""
 
diff --git a/po/hr.gmo b/po/hr.gmo
index b522a85df144c3dd94c3f0f06c7cba61ce9a7e4e..d31112d4f01f04c9267fdb251c6c6cbb080fd5be 100644
Binary files a/po/hr.gmo and b/po/hr.gmo differ
diff --git a/po/hr.po b/po/hr.po
index 419d159595651a170defcdd4b1c518c6540757be..e54d070cf3eee2bee1f6765cf9518c2acb566b04 100644
--- a/po/hr.po
+++ b/po/hr.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 0.10.28.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2012-04-16 03:04+0200\n"
 "Last-Translator: Tomislav Krznar <tomislav.krznar@gmail.com>\n"
 "Language-Team: Croatian <lokalizacija@linux.hr>\n"
@@ -85,6 +85,9 @@ msgstr "Videozapis u ovoj datoteci se možda neće ispravno reproducirati."
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Ova datoteka sadrži previše nizova. Reproduciram samo prvih %d"
 
+msgid "Internal data flow error."
+msgstr "Greška unutarnjeg toka podataka."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -100,9 +103,6 @@ msgstr ""
 "Nisu pronađeni podržani nizovi. Morate dozvoliti više protokola prijenosa "
 "ili vam možda nedostaje odgovarajući GStreamer RTSP priključak proširenja."
 
-msgid "Internal data flow error."
-msgstr "Greška unutarnjeg toka podataka."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/hu.gmo b/po/hu.gmo
index c6a4f471973aa29f5b11595b1f23a77d6841c810..76de3cf985d568ad3fb2649909615a073683b00a 100644
Binary files a/po/hu.gmo and b/po/hu.gmo differ
diff --git a/po/hu.po b/po/hu.po
index bf03ea985499109c3ed925daf2d2911d0978ba2e..8da7fad5d4452debf781aea4864b07f67c4f8746 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 1.3.90\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-06-29 12:56+0200\n"
 "Last-Translator: Balázs Úr <urbalazs@gmail.com>\n"
 "Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
@@ -92,6 +92,9 @@ msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 "A fájl túl sok adatfolyamot tartalmaz. Csak az első %d kerül lejátszásra."
 
+msgid "Internal data flow error."
+msgstr "Belső adatfolyam-hiba."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -107,9 +110,6 @@ msgstr ""
 "Nem található támogatott adatfolyam. Lehet, hogy több átviteli protokollt "
 "kell engedélyezni, vagy hiányzik a megfelelő GStreamer RTSP bővítmény."
 
-msgid "Internal data flow error."
-msgstr "Belső adatfolyam-hiba."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/id.gmo b/po/id.gmo
index ec600d27027cec750760e619f2e22642554f55cf..2642ab43d6964bc79601ae02a28e0c9d9f6eb2fa 100644
Binary files a/po/id.gmo and b/po/id.gmo differ
diff --git a/po/id.po b/po/id.po
index ed150c82b0230b861b41cb0ffbc28eafaa378b86..6579e9c32c3c9c62dc3995a62028fd9ed14dd73e 100644
--- a/po/id.po
+++ b/po/id.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 1.3.90\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-07-06 21:37+0700\n"
 "Last-Translator: Andhika Padmawan <andhika.padmawan@gmail.com>\n"
 "Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
@@ -87,6 +87,9 @@ msgstr "Video di berkas ini mungkin tak dapat diputar dengan benar."
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Berkas ini berisi terlalu banyak arus. Hanya memutar %d pertama"
 
+msgid "Internal data flow error."
+msgstr "Galat aliran data internal."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -103,9 +106,6 @@ msgstr ""
 "banyak transportasi atau kehilangan plugin ekstensi GStreamer RTSP yang "
 "benar."
 
-msgid "Internal data flow error."
-msgstr "Galat aliran data internal."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/it.gmo b/po/it.gmo
index ba828e20d2a4d086d3538cb4b2d860e1efa84e36..0bf64ce1663105c3c5b9653d497b56cb85fdadc7 100644
Binary files a/po/it.gmo and b/po/it.gmo differ
diff --git a/po/it.po b/po/it.po
index ff2ef2f64e53d6f93e744fb3e154cadcd38a4ff8..e15857aad7335dbc8839f357c082ae21a7d59e87 100644
--- a/po/it.po
+++ b/po/it.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 0.10.25.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2010-10-25 10:11+0200\n"
 "Last-Translator: Luca Ferretti <elle.uca@infinito.it>\n"
 "Language-Team: Italian <tp@lists.linux.it>\n"
@@ -86,6 +86,9 @@ msgstr "Il video in questo file potrebbe non essere riprodotto correttamente."
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Questo file contiene troppi stream. Riprodotti solo i primi %d"
 
+msgid "Internal data flow error."
+msgstr "Errore interno nel flusso di dati."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -103,9 +106,6 @@ msgstr ""
 "abilitare altri protocolli di trasporto oppure in alternativa potrebbe "
 "mancare il corretto plugin GStreamer di tipo estensione RTSP."
 
-msgid "Internal data flow error."
-msgstr "Errore interno nel flusso di dati."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/ja.gmo b/po/ja.gmo
index 68ce520547e320a8ddbecf57f7a98d7ad5696784..7f03f7a81c41788fa190610e7212ef889116fed9 100644
Binary files a/po/ja.gmo and b/po/ja.gmo differ
diff --git a/po/ja.po b/po/ja.po
index c3d0ad9e707602ef4160418bbbc1b54c33049a71..8c6b6e3fd4bbaa46b16004fe5e98d187321d1540 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 1.0.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2012-12-22 20:13+0900\n"
 "Last-Translator: Takeshi Hamasaki <hmatrjp@users.sourceforge.jp>\n"
 "Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
@@ -89,6 +89,9 @@ msgstr ""
 "このファイルには多くのストリームが格納されているため、最初の %d 個のみ再生し"
 "ます"
 
+msgid "Internal data flow error."
+msgstr "内部データフローエラー。"
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -105,9 +108,6 @@ msgstr ""
 "する必要があるかもしれません。または、正しい GStreamer RTSP 拡張プラグインが"
 "ないのかもしれません。"
 
-msgid "Internal data flow error."
-msgstr "内部データフローエラー。"
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/lt.gmo b/po/lt.gmo
index b90ff431acdaa0171c54707edd7e160104503b9e..9a854f93cb177eff2196f44c5723b9d2074294bc 100644
Binary files a/po/lt.gmo and b/po/lt.gmo differ
diff --git a/po/lt.po b/po/lt.po
index 1a34a12213cf7f65bc9b1bbc6095cf9ddac9eb6a..8d37c9f2ab4a4afd4f5c97e1a178b0b18dcca5e6 100644
--- a/po/lt.po
+++ b/po/lt.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 0.10.23.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2010-07-16 19:34+0300\n"
 "Last-Translator: Žygimantas Beručka <uid0@akl.lt>\n"
 "Language-Team: Lithuanian <komp_lt@konferencijos.lt>\n"
@@ -88,6 +88,9 @@ msgstr "Šiame faile esantis vaizdo įrašas gali būti atkurtas nekorektiškai.
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Šiame faile per daug srautų. Grojami tik pirmieji %d"
 
+msgid "Internal data flow error."
+msgstr "Vidinė duomenų srauto klaida."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -103,9 +106,6 @@ msgstr ""
 "Nerasta palaikomų srautų. Jums gali reikėti leisti daugiau transporto "
 "protokolų, arba jūs neturite tinkamo GStreamer RTSP papildinio įskiepio."
 
-msgid "Internal data flow error."
-msgstr "Vidinė duomenų srauto klaida."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/lv.gmo b/po/lv.gmo
index 3cec46df66b0dd31d48c03e76404f8eaae84abb8..ca7c1e1161f93b2d1d5b72ceb9926cf491336d0c 100644
Binary files a/po/lv.gmo and b/po/lv.gmo differ
diff --git a/po/lv.po b/po/lv.po
index 32f0bf33881fad8f0f4ae2e7f6d48805b34c1dea..906ba1e94163f43fe8efcb7158e848cc3799b2e4 100644
--- a/po/lv.po
+++ b/po/lv.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 1.2.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-04-20 16:38+0300\n"
 "Last-Translator: Rihards Prieditis <rprieditis@gmail.com>\n"
 "Language-Team: Latvian <translation-team-lv@lists.sourceforge.net>\n"
@@ -88,6 +88,9 @@ msgstr "Video šajā datnē varētu tikt atskaņots nepareizi."
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Šī datne satur pārāk daudz straumju. Tiek atskaņota tikai pirmā %d"
 
+msgid "Internal data flow error."
+msgstr "Iekšēja datu plūsmas kļūda."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -103,9 +106,6 @@ msgstr ""
 "Netika atrasta atbalstīta straume. Iespējams, jums jāatļauj vairāk "
 "transporta protokoli vai arī trūkst GStreamer RTSP paplašinājuma spraudnis. "
 
-msgid "Internal data flow error."
-msgstr "Iekšēja datu plūsmas kļūda."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/mt.gmo b/po/mt.gmo
index 5efcf7edeed3f5688c53fd1b2165d5c5022f95ed..9480dedf7a8f198990e8ffbce012a1340dee278b 100644
Binary files a/po/mt.gmo and b/po/mt.gmo differ
diff --git a/po/mt.po b/po/mt.po
index 035814a701aa03c772029a5ed97b41aa37bb58d2..6470f8bedb0e1d2a5fb2ba3ae40fe3f5e0b70bdc 100644
--- a/po/mt.po
+++ b/po/mt.po
@@ -5,7 +5,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good-0.10.10.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2008-10-26 19:09+0100\n"
 "Last-Translator: Michel Bugeja <michelbugeja@rabatmalta.com>\n"
 "Language-Team: Maltese <translation-team-mt@lists.sourceforge.net>\n"
@@ -86,6 +86,9 @@ msgstr "Jista jkun illi l-vidjo ġo dan il-fajl ma jidhirx sewwa."
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Il-fajl fiħ aktar streams milli suppost. Ser indoqq l-ewwel %d"
 
+msgid "Internal data flow error."
+msgstr "Problema interna ta' data flow"
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -97,9 +100,6 @@ msgid ""
 "plugin."
 msgstr ""
 
-msgid "Internal data flow error."
-msgstr "Problema interna ta' data flow"
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/nb.gmo b/po/nb.gmo
index 256cecf1279f13d89466743b13b138e40f86b6aa..9de6d0567fd608f8a55046a2a84c12970e4c267a 100644
Binary files a/po/nb.gmo and b/po/nb.gmo differ
diff --git a/po/nb.po b/po/nb.po
index 916ea995c6a996f4e40e9bd17ed60bf7101baa62..15c8db3ce437757510d3f27e95ff29dbca82f699 100644
--- a/po/nb.po
+++ b/po/nb.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 1.2.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-01-22 17:49+0100\n"
 "Last-Translator: Johnny A. Solbu <johnny@solbu.net>\n"
 "Language-Team: Norwegian Bokmaal <i18n-nb@lister.ping.uio.no>\n"
@@ -85,6 +85,9 @@ msgstr "Videoen i denne filen spilles kanskje ikke av korrekt."
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Filen inneholder for mange strømmer. Spiller bare første %d"
 
+msgid "Internal data flow error."
+msgstr "Intern dataflytfeil."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -101,9 +104,6 @@ msgstr ""
 "transportprotokoller eller den kan mangle den rette GStreamer RTSP-"
 "utvidelsestillegget."
 
-msgid "Internal data flow error."
-msgstr "Intern dataflytfeil."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/nl.gmo b/po/nl.gmo
index aa3b7e3c6195cfef49d8ed3dde4f55b36841129b..631c8cdf82bb19332587a8e5fa63f62819028ace 100644
Binary files a/po/nl.gmo and b/po/nl.gmo differ
diff --git a/po/nl.po b/po/nl.po
index e32ef5e606981055e045ea99cef385f740ef7252..26309eeb41208f58e8ea9c20fa0b208c579092b1 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-05-22 00:41+0200\n"
 "Last-Translator: Freek de Kruijf <f.de.kruijf@gmail.com>\n"
 "Language-Team: Dutch <vertaling@vrijschrift.org>\n"
@@ -87,6 +87,9 @@ msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 "Dit bestand bevat te veel stromen. Alleen de eerste %d worden afgespeeld."
 
+msgid "Internal data flow error."
+msgstr "Interne fout in de gegevensdoorvoer."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -103,9 +106,6 @@ msgstr ""
 "overdrachtsprotocollen toestaan of anders ontbreekt de juiste GStreamer RTSP "
 "extensie-plugin."
 
-msgid "Internal data flow error."
-msgstr "Interne fout in de gegevensdoorvoer."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/or.gmo b/po/or.gmo
index ed3cadd846d61638cf50a0d0fd1bb815a75ea45c..1431ad9840ff704922e933c0305840571cc0d8a3 100644
Binary files a/po/or.gmo and b/po/or.gmo differ
diff --git a/po/or.po b/po/or.po
index 08c9017ccb70dbb92dca9b32f74605e714fce82c..74b2966237180de052bdeac5326f6ae93110f30e 100644
--- a/po/or.po
+++ b/po/or.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-0.8.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2004-09-27 13:32+0530\n"
 "Last-Translator: Gora Mohanty <gora_mohanty@yahoo.co.in>\n"
 "Language-Team: Oriya <gora_mohanty@yahoo.co.in>\n"
@@ -88,6 +88,9 @@ msgstr ""
 msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 
+msgid "Internal data flow error."
+msgstr ""
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -99,9 +102,6 @@ msgid ""
 "plugin."
 msgstr ""
 
-msgid "Internal data flow error."
-msgstr ""
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/pl.gmo b/po/pl.gmo
index 55c13f64a4de40178255572931bf37bea12025b2..cc31e653963868a32c751ee48a05ecec030b6c98 100644
Binary files a/po/pl.gmo and b/po/pl.gmo differ
diff --git a/po/pl.po b/po/pl.po
index 035d370a1e596717d42d8e3691044c6bd23bf5c5..b346433593f769dfc45b9468be68bb8bb3eb8af1 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 1.3.90\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-06-29 10:45+0200\n"
 "Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
 "Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
@@ -83,6 +83,9 @@ msgstr "Obraz w tym pliku może nie być odtwarzany prawidłowo."
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Ten plik zawiera zbyt dużo strumieni. Odtwarzanie tylko %d pierwszych"
 
+msgid "Internal data flow error."
+msgstr "Błąd wewnętrzny przepływu danych."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -99,9 +102,6 @@ msgstr ""
 "protokołów transportu, albo może brakować właściwej wtyczki rozszerzenia "
 "RTSP GStreamera."
 
-msgid "Internal data flow error."
-msgstr "Błąd wewnętrzny przepływu danych."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo
index 37bfb11293a611db360a751465bc1c32a0ea0c3c..6055b680162491dd15e7684a45d338c6a0d8ec14 100644
Binary files a/po/pt_BR.gmo and b/po/pt_BR.gmo differ
diff --git a/po/pt_BR.po b/po/pt_BR.po
index ece5c944a482122b12a7e71c62bfa282f5fc295f..9925fa23101083eb481ef480a402ca8453761807 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -11,7 +11,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good-1.2.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2013-12-29 17:48-0200\n"
 "Last-Translator: Fabrício Godoy <skarllot@gmail.com>\n"
 "Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge."
@@ -92,6 +92,9 @@ msgstr "O vídeo neste arquivo pode não ser reproduzido corretamente."
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Este arquivo contêm muitos fluxos. Apenas reproduzindo o primeiro %d"
 
+msgid "Internal data flow error."
+msgstr "Erro interno no fluxo de dados."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -108,9 +111,6 @@ msgstr ""
 "protocolos de transporte sejam permitidos ou senão o plug-in de extensão "
 "GStreamer RTSP pode estar incorreto."
 
-msgid "Internal data flow error."
-msgstr "Erro interno no fluxo de dados."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/ro.gmo b/po/ro.gmo
index 7f1c6a38092c5fcb5cdbfe6019fd4e2a91d3803f..8b6acd61d8102f4ad5f5aa394f8b7e4f7ec240f0 100644
Binary files a/po/ro.gmo and b/po/ro.gmo differ
diff --git a/po/ro.po b/po/ro.po
index 2077bd25f597412dbae0b9c08e30bde119243192..bad69718d750e63811d793eb4ed4b057dce333d4 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -5,7 +5,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 0.10.23.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2010-08-16 03:22+0300\n"
 "Last-Translator: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>\n"
 "Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
@@ -88,6 +88,9 @@ msgstr "Este posibil ca fișierul video să nu fie redat corect."
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Fișierul conține prea multe fluxuri. Se redau doar primele %d"
 
+msgid "Internal data flow error."
+msgstr "Eroare internă a fluxului de date."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -104,9 +107,6 @@ msgstr ""
 "multor protocoale de transport sau de altfel s-ar putea să lipsească modulul "
 "corect de extensie GStreamer RTSP."
 
-msgid "Internal data flow error."
-msgstr "Eroare internă a fluxului de date."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/ru.gmo b/po/ru.gmo
index 6f205a1922ae072b61f5b65d362825c69ec3a364..124c3463f7f585a0b5f1f23eda65db0f1e9d6875 100644
Binary files a/po/ru.gmo and b/po/ru.gmo differ
diff --git a/po/ru.po b/po/ru.po
index 0227a3d0d5a07f9b4d0105af869c78e4baa5bdb6..7f7f82781a0b46b53dfe017343edb898b19830dc 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 1.3.90\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-06-29 18:59+0400\n"
 "Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
 "Language-Team: Russian <gnu@mx.ru>\n"
@@ -93,6 +93,9 @@ msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 "Файл содержит слишком много потоков. Будет воспроизведёно только первых %d"
 
+msgid "Internal data flow error."
+msgstr "Внутренняя ошибка потока данных."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -108,9 +111,6 @@ msgstr ""
 "Ни один поток не поддерживается. Возможно требуется разрешить дополнительные "
 "протоколы передачи или же отсутствует правильный модуль GStreamer RTSP."
 
-msgid "Internal data flow error."
-msgstr "Внутренняя ошибка потока данных."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/sk.gmo b/po/sk.gmo
index d4c2aa3149bee5cc1d751a4c17713a1d68a694cc..a16191d0dd7375cb96ccfadf8e7e8b806880a7b3 100644
Binary files a/po/sk.gmo and b/po/sk.gmo differ
diff --git a/po/sk.po b/po/sk.po
index 3fc2be498f969a03a6fc5cad2f3a3bfcd82bc8e6..f3c79602cf9201a0ee031f4ac68e24e42e66a1d9 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 1.2.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-01-30 11:08+0100\n"
 "Last-Translator: Peter Tuharsky <tuharsky@misbb.sk>\n"
 "Language-Team: Slovak <sk-i18n@lists.linux.sk>\n"
@@ -86,6 +86,9 @@ msgstr "Video v tomto súbore možno nebude hrať korektne."
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Tento súbor obsahuje príliš mnoho prúdov údajov. Prehrávam iba prvý %d"
 
+msgid "Internal data flow error."
+msgstr "Vnútorná chyba toku údajov."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -102,9 +105,6 @@ msgstr ""
 "viacero prenosových protokolov, alebo vám možno chýba správny zásuvný modul "
 "GStreamer RTSP."
 
-msgid "Internal data flow error."
-msgstr "Vnútorná chyba toku údajov."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/sl.gmo b/po/sl.gmo
index 4c76498cd004f908195418c0d80bf8b277c5e3e2..d19bd16f420a9af6649baedc5091cf6a1d2d1a6d 100644
Binary files a/po/sl.gmo and b/po/sl.gmo differ
diff --git a/po/sl.po b/po/sl.po
index 3499af2584223c2581ff3f14122fab5e3efdedb2..ad2aaf606e360f48c163f12cd108088223b263dd 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -10,7 +10,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good-1.2.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-04-09 22:52+0100\n"
 "Last-Translator: Klemen Košir <klemen913@gmail.com>\n"
 "Language-Team: Slovenian <translation-team-sl@lists.sourceforge.net>\n"
@@ -89,6 +89,9 @@ msgstr "Video zapis v tej datoteki morda ne bo predvajan pravilno."
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Datoteka vsebuje več pretokov. Predvajano bo le začetnih %d"
 
+msgid "Internal data flow error."
+msgstr "Notranja napaka pretoka podatkov."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -105,9 +108,6 @@ msgstr ""
 "protokolov prenosa, oziroma manjka ustrezen vstavek GStreamer RTSP "
 "razširitve."
 
-msgid "Internal data flow error."
-msgstr "Notranja napaka pretoka podatkov."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/sq.gmo b/po/sq.gmo
index 4d3644259bc87e19420e5249fa5466c455ed3c60..fe6afbaf9827ce5fbc1f963f45a4a70b3fe2d387 100644
Binary files a/po/sq.gmo and b/po/sq.gmo differ
diff --git a/po/sq.po b/po/sq.po
index ce002280fd378e6532bbb6980b8ca89cab747511..13ebeffbca606c95f4189dca6cd46996539bdf12 100644
--- a/po/sq.po
+++ b/po/sq.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins 0.8.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2004-08-07 20:29+0200\n"
 "Last-Translator: Laurent Dhima <laurenti@alblinux.net>\n"
 "Language-Team: Albanian <begraj@hotmail.com>\n"
@@ -86,6 +86,9 @@ msgstr ""
 msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 
+msgid "Internal data flow error."
+msgstr ""
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -97,9 +100,6 @@ msgid ""
 "plugin."
 msgstr ""
 
-msgid "Internal data flow error."
-msgstr ""
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/sr.gmo b/po/sr.gmo
index 4f0705a7fce404512a836bb22484920c552b67a7..0e7766dd97fcca5e1d31f424e92d92bddf7e985f 100644
Binary files a/po/sr.gmo and b/po/sr.gmo differ
diff --git a/po/sr.po b/po/sr.po
index abc70c9c158387e44a9f34530bb1acfb6a02c31b..a9e22595a21f00201fb5e71305ce182e39904769 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good-1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-06-18 19:56+0200\n"
 "Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
 "Language-Team: Serbian <(nothing)>\n"
@@ -86,6 +86,9 @@ msgstr "Видео у овој датотеци можда неће бити п
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Ова датотека садржи превише токова. Пуштам само први %d"
 
+msgid "Internal data flow error."
+msgstr "Унутрaшња грешка протока података."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -102,9 +105,6 @@ msgstr ""
 "протокола преноса или можда на неки други начин недостаје прави прикључак "
 "РТСП проширења ГСтримера."
 
-msgid "Internal data flow error."
-msgstr "Унутрaшња грешка протока података."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/sv.gmo b/po/sv.gmo
index 4658a005f1531a1e4c96d8a12501e2c20f74aec4..438f34e54304822d4b2a072828c63476ef48ef4c 100644
Binary files a/po/sv.gmo and b/po/sv.gmo differ
diff --git a/po/sv.po b/po/sv.po
index faa3379fd4b52012a9b7b36a8cc48b5555b5360d..603151e016f945261c782f78a36cca46ac95a8c3 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 1.3.90\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-07-11 02:52+0200\n"
 "Last-Translator: Sebastian Rasmussen <sebras@gmail.com>\n"
 "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
@@ -86,6 +86,9 @@ msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 "Den här filen innehåller för många strömmar. Spelar endast upp de första %d"
 
+msgid "Internal data flow error."
+msgstr "Internt fel i dataflöde."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -102,9 +105,6 @@ msgstr ""
 "transportprotokoll eller så saknar du kanske det rätta GStreamer-tillägget "
 "för RTSP."
 
-msgid "Internal data flow error."
-msgstr "Internt fel i dataflöde."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/tr.gmo b/po/tr.gmo
index 42eb33fae9d149c2c6e0def5d4cec8300569a1b3..8032a25a62c7a35029af86d9d2b536f649f11a69 100644
Binary files a/po/tr.gmo and b/po/tr.gmo differ
diff --git a/po/tr.po b/po/tr.po
index cdecfa47bd6fe76f9e5ad64e3a3a799620562d76..f0efdff35e8708460a11b4f10dec3788d191b266 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 1.0.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2013-03-10 13:05+0200\n"
 "Last-Translator: Server Acim <serveracim@gmail.com>\n"
 "Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
@@ -85,6 +85,9 @@ msgstr "Bu dosyadaki vidyo doğru oynatılamıyabilir."
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Bu dosya çok fazla akış içeriyor. Sadece ilki oynatılıyor %d"
 
+msgid "Internal data flow error."
+msgstr "İç veri akış hatası."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -100,9 +103,6 @@ msgstr ""
 "Desteklenen akış bulunamadı. Daha fazla aktarım protokolüne izin vermeniz "
 "veya doğru GStreamer RTSP uzantı eklentisine onay vermeniz gerekebilir."
 
-msgid "Internal data flow error."
-msgstr "İç veri akış hatası."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/uk.gmo b/po/uk.gmo
index 78c1ab2aaeec736f0897b31a6d8888d921eaa51a..10dce38d5e39f5be6ba50407739059e3c2237be2 100644
Binary files a/po/uk.gmo and b/po/uk.gmo differ
diff --git a/po/uk.po b/po/uk.po
index 211bf656c5cf035b74cc583e880166b0d77b9767..f42f82fcbdccd30cbc9b015272949ab00533a580 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 1.3.90\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-06-29 11:40+0300\n"
 "Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
 "Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n"
@@ -93,6 +93,9 @@ msgstr ""
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Файл містить надто багато потоків. Відтворюються лише перші %d"
 
+msgid "Internal data flow error."
+msgstr "Помилка внутрішнього перенесення даних."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -108,9 +111,6 @@ msgstr ""
 "Не знайдено підтримуваних потоків. Ймовірно, вам слід увімкнути додаткові "
 "протоколи передавання даних або встановити додатковий модуль RTSP GStreamer."
 
-msgid "Internal data flow error."
-msgstr "Помилка внутрішнього перенесення даних."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/vi.gmo b/po/vi.gmo
index 8821c82264b844f005bc4d93b30f14a41bf63ac1..00073b31b7cc24c3ad170db7f8ac3f5381ed44b3 100644
Binary files a/po/vi.gmo and b/po/vi.gmo differ
diff --git a/po/vi.po b/po/vi.po
index 3a3b17955c1bd25ece2fce0d43f2bb67e607f0c6..1c911354e1e2186bd293bacf0d80676d17110cc2 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 1.3.90\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-06-30 09:12+0700\n"
 "Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n"
 "Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n"
@@ -92,6 +92,9 @@ msgstr "Ảnh động trong tập tin này có thể không phát đúng."
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "Tập tin này chứa quá nhiều luồng nên chỉ phát %d đầu tiên"
 
+msgid "Internal data flow error."
+msgstr "Lỗi luồng dữ liệu nội bộ."
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -107,9 +110,6 @@ msgstr ""
 "Không tìm thấy luồng dữ liệu được hỗ trợ. Người dùng có thể cần cho phép "
 "thêm giao thức truyền, hoặc chưa cài đặt phần bổ sung RTSP Gstreamer đúng."
 
-msgid "Internal data flow error."
-msgstr "Lỗi luồng dữ liệu nội bộ."
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo
index 6893ccc8f78c32982302fbcd66c52a690cd5823b..c26f32321d17a46978b2f2bc4be66cb4db988531 100644
Binary files a/po/zh_CN.gmo and b/po/zh_CN.gmo differ
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 7702952c430ee4e326f0191f8e6a43e288e98f08..a641a126238f1c902e675189490cc4bfe82caea8 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good 0.10.16.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2009-11-13 22:20+0800\n"
 "Last-Translator: Ji ZhengYu <zhengyuji@gmail.com>\n"
 "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
@@ -86,6 +86,9 @@ msgstr "此文件中的视频可能无法正确播放。"
 msgid "This file contains too many streams. Only playing first %d"
 msgstr "此文件包含了太多的流。只播放前面 %d 个"
 
+msgid "Internal data flow error."
+msgstr "内部数据流错误。"
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -101,9 +104,6 @@ msgstr ""
 "未找到支持的流媒体。您可能需要启用更多的传送协议,或者也有可能是缺少正确的 "
 "GStreamer RTSP 扩展插件。"
 
-msgid "Internal data flow error."
-msgstr "内部数据流错误。"
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/zh_HK.gmo b/po/zh_HK.gmo
index e0a3a79f4ff5b51490a683ee9eb3826f79de0e6f..bde5918b49ba7d08330897bc82ff1d9b94514aa9 100644
Binary files a/po/zh_HK.gmo and b/po/zh_HK.gmo differ
diff --git a/po/zh_HK.po b/po/zh_HK.po
index d2b2bd0fe3a40e7212b2475a33f64d53bb37f2e7..9822f9a0efcb69fa971b75dd3624e82d02c62388 100644
--- a/po/zh_HK.po
+++ b/po/zh_HK.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good-0.10.2 0.10.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2006-08-29 01:08+0800\n"
 "Last-Translator: Abel Cheung <abelcheung@gmail.com>\n"
 "Language-Team: Chinese (Hong Kong) <community@linuxhall.org>\n"
@@ -82,6 +82,10 @@ msgstr ""
 msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 
+#, fuzzy
+msgid "Internal data flow error."
+msgstr "內部資料串流發生錯誤。"
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -93,10 +97,6 @@ msgid ""
 "plugin."
 msgstr ""
 
-#, fuzzy
-msgid "Internal data flow error."
-msgstr "內部資料串流發生錯誤。"
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/po/zh_TW.gmo b/po/zh_TW.gmo
index 1b793b83b3d260531acc74d6c288bff601a31d5a..68499a0ac52c55350eb53c5c1d262897f63d7b43 100644
Binary files a/po/zh_TW.gmo and b/po/zh_TW.gmo differ
diff --git a/po/zh_TW.po b/po/zh_TW.po
index e692846e8cee99845920c5d786131ecca82c2265..42899f0a191a895f45a4b844256618459c598fd9 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gst-plugins-good-0.10.2 0.10.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-17 09:11+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2006-08-29 01:08+0800\n"
 "Last-Translator: Abel Cheung <abelcheung@gmail.com>\n"
 "Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n"
@@ -82,6 +82,10 @@ msgstr ""
 msgid "This file contains too many streams. Only playing first %d"
 msgstr ""
 
+#, fuzzy
+msgid "Internal data flow error."
+msgstr "內部資料串流發生錯誤。"
+
 msgid ""
 "No supported stream was found. You might need to install a GStreamer RTSP "
 "extension plugin for Real media streams."
@@ -93,10 +97,6 @@ msgid ""
 "plugin."
 msgstr ""
 
-#, fuzzy
-msgid "Internal data flow error."
-msgstr "內部資料串流發生錯誤。"
-
 msgid ""
 "Could not open audio device for playback. Device is being used by another "
 "application."
diff --git a/sys/osxaudio/gstosxcoreaudio.h b/sys/osxaudio/gstosxcoreaudio.h
index 8b509aabfd55220a1d553bfe51cfae249f9af445..b319ced0e4ad33c5af4a924294adafd07efbdb5b 100644
--- a/sys/osxaudio/gstosxcoreaudio.h
+++ b/sys/osxaudio/gstosxcoreaudio.h
@@ -68,7 +68,7 @@ G_BEGIN_DECLS
 #define CORE_AUDIO_FORMAT_IS_SPDIF(f) ((f).mFormat.mFormatID == 'IAC3' || (f).mFormat.mFormatID == 'iac3' || (f).mFormat.mFormatID == kAudioFormat60958AC3 || (f).mFormat.mFormatID == kAudioFormatAC3)
 
 #define CORE_AUDIO_FORMAT "FormatID: %" GST_FOURCC_FORMAT " rate: %f flags: 0x%x BytesPerPacket: %u FramesPerPacket: %u BytesPerFrame: %u ChannelsPerFrame: %u BitsPerChannel: %u"
-#define CORE_AUDIO_FORMAT_ARGS(f) GST_FOURCC_ARGS((f).mFormatID),(f).mSampleRate,(unsigned)(f).mFormatFlags,(unsigned)(f).mBytesPerPacket,(unsigned)(f).mFramesPerPacket,(unsigned)(f).mBytesPerFrame,(unsigned)(f).mChannelsPerFrame,(unsigned)(f).mBitsPerChannel
+#define CORE_AUDIO_FORMAT_ARGS(f) GST_FOURCC_ARGS((unsigned int)(f).mFormatID),(f).mSampleRate,(unsigned int)(f).mFormatFlags,(unsigned int)(f).mBytesPerPacket,(unsigned int)(f).mFramesPerPacket,(unsigned int)(f).mBytesPerFrame,(unsigned int)(f).mChannelsPerFrame,(unsigned int)(f).mBitsPerChannel
 
 typedef struct _GstCoreAudio GstCoreAudio;
 typedef struct _GstCoreAudioClass GstCoreAudioClass;
diff --git a/sys/osxaudio/gstosxcoreaudiohal.c b/sys/osxaudio/gstosxcoreaudiohal.c
index f1ebdf5d38037a340326fe0e322362dc117fec68..776d765995fab9cf1d6e3b6e4c198d0526360e80 100644
--- a/sys/osxaudio/gstosxcoreaudiohal.c
+++ b/sys/osxaudio/gstosxcoreaudiohal.c
@@ -341,7 +341,7 @@ gst_core_audio_audio_device_get_channel_layout (AudioDeviceID device_id,
   status = AudioObjectGetPropertyDataSize (device_id,
       &channelLayoutAddress, 0, NULL, &propertySize);
   if (status != noErr) {
-    GST_ERROR ("failed to get prefered layout: %d", (int) status);
+    GST_ERROR ("failed to get preferred layout: %d", (int) status);
     goto beach;
   }
 
@@ -350,7 +350,7 @@ gst_core_audio_audio_device_get_channel_layout (AudioDeviceID device_id,
   status = AudioObjectGetPropertyData (device_id,
       &channelLayoutAddress, 0, NULL, &propertySize, layout);
   if (status != noErr) {
-    GST_ERROR ("failed to get prefered layout: %d", (int) status);
+    GST_ERROR ("failed to get preferred layout: %d", (int) status);
     goto failed;
   }
 
diff --git a/sys/osxvideo/cocoawindow.m b/sys/osxvideo/cocoawindow.m
index 57d19a9bf100458b404434636b37e8ca198aba63..71e1ca0504a7a600d76dbd871a30a1f888ac7cca 100644
--- a/sys/osxvideo/cocoawindow.m
+++ b/sys/osxvideo/cocoawindow.m
@@ -336,7 +336,9 @@ const gchar* gst_keycode_to_keyname(gint16 keycode)
     NSOpenGLPFAColorSize, 24,
     NSOpenGLPFAAlphaSize, 8,
     NSOpenGLPFADepthSize, 24,
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1090
     NSOpenGLPFAWindow,
+#endif
     0
   };
 
@@ -573,7 +575,9 @@ const gchar* gst_keycode_to_keyname(gint16 keycode)
       NSOpenGLPFAColorSize, 24,
       NSOpenGLPFAAlphaSize, 8,
       NSOpenGLPFADepthSize, 24,
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
       NSOpenGLPFAFullScreen,
+#endif
       NSOpenGLPFAScreenMask,
       CGDisplayIDToOpenGLDisplayMask (kCGDirectMainDisplay),
       0
@@ -602,7 +606,9 @@ const gchar* gst_keycode_to_keyname(gint16 keycode)
       GST_WARNING ("CGCaptureAllDisplays() failed");
       return;
     }
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
     [fullScreenContext setFullScreen];
+#endif
     [fullScreenContext makeCurrentContext];
 
     fullscreen = YES;
diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c
index 4815336d5eece568ee0b96227613692ebea6d5ec..7c963cc572f9f62bb23c5b42aef35e3a62a4f2e5 100644
--- a/sys/v4l2/gstv4l2bufferpool.c
+++ b/sys/v4l2/gstv4l2bufferpool.c
@@ -549,6 +549,13 @@ gst_v4l2_buffer_pool_set_config (GstBufferPool * bpool, GstStructure * config)
     GST_INFO_OBJECT (pool, "increasing minimum buffers to %u", min_buffers);
   }
 
+  /* respect driver requirements */
+  if (min_buffers < obj->min_buffers) {
+    updated = TRUE;
+    min_buffers = obj->min_buffers;
+    GST_INFO_OBJECT (pool, "increasing minimum buffers to %u", min_buffers);
+  }
+
   if (max_buffers > VIDEO_MAX_FRAME || max_buffers == 0) {
     updated = TRUE;
     max_buffers = VIDEO_MAX_FRAME;
@@ -1240,6 +1247,8 @@ gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool * pool, GstBuffer ** buffer)
     GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_CORRUPTED);
 
   GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
+  GST_BUFFER_OFFSET (outbuf) = group->buffer.sequence;
+  GST_BUFFER_OFFSET_END (outbuf) = group->buffer.sequence + 1;
 
 done:
   *buffer = outbuf;
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
index 9c8dfb2e38d78506bf508c7b38f68322cc2134eb..816b42c9112c213bfed3cefb9a69e17b33783487 100644
--- a/sys/v4l2/gstv4l2object.c
+++ b/sys/v4l2/gstv4l2object.c
@@ -720,6 +720,28 @@ gst_v4l2_object_get_property_helper (GstV4l2Object * v4l2object,
   return TRUE;
 }
 
+static void
+gst_v4l2_get_driver_min_buffers (GstV4l2Object * v4l2object)
+{
+  int min;
+  gboolean ret = FALSE;
+
+  /* Certain driver may expose a minimum number of buffers through controls. */
+  /* If the ioctl is not supported by the driver, min_buffers remains zero.  */
+  ret = gst_v4l2_get_attribute (v4l2object,
+      V4L2_TYPE_IS_OUTPUT (v4l2object->type)
+      ? V4L2_CID_MIN_BUFFERS_FOR_OUTPUT : V4L2_CID_MIN_BUFFERS_FOR_CAPTURE,
+      &min);
+
+  if (ret) {
+    GST_DEBUG_OBJECT (v4l2object->element,
+        "driver requires a minimum of %d buffers", min);
+    v4l2object->min_buffers = min;
+  } else {
+    v4l2object->min_buffers = 0;
+  }
+}
+
 static void
 gst_v4l2_set_defaults (GstV4l2Object * v4l2object)
 {
@@ -1731,7 +1753,7 @@ gst_v4l2_object_add_interlace_mode (GstV4l2Object * v4l2object,
 {
   struct v4l2_format fmt;
   GValue interlace_formats = { 0, };
-  GstVideoInterlaceMode interlace_mode;
+  GstVideoInterlaceMode interlace_mode, prev = -1;
 
   const gchar *mode_strings[] = { "progressive",
     "interleaved",
@@ -1762,6 +1784,7 @@ gst_v4l2_object_add_interlace_mode (GstV4l2Object * v4l2object,
     g_value_init (&interlace_enum, G_TYPE_STRING);
     g_value_set_string (&interlace_enum, mode_strings[interlace_mode]);
     gst_value_list_append_and_take_value (&interlace_formats, &interlace_enum);
+    prev = interlace_mode;
   }
 
   memset (&fmt, 0, sizeof (fmt));
@@ -1772,7 +1795,8 @@ gst_v4l2_object_add_interlace_mode (GstV4l2Object * v4l2object,
   fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;
 
   if (gst_v4l2_object_try_fmt (v4l2object, &fmt) == 0 &&
-      gst_v4l2_object_get_interlace_mode (fmt.fmt.pix.field, &interlace_mode)) {
+      gst_v4l2_object_get_interlace_mode (fmt.fmt.pix.field, &interlace_mode) &&
+      prev != interlace_mode) {
     GValue interlace_enum = { 0, };
     g_value_init (&interlace_enum, G_TYPE_STRING);
     g_value_set_string (&interlace_enum, mode_strings[interlace_mode]);
@@ -2407,6 +2431,11 @@ gst_v4l2_object_setup_pool (GstV4l2Object * v4l2object, GstCaps * caps)
   GST_INFO_OBJECT (v4l2object->element, "accessing buffers via mode %d", mode);
   v4l2object->mode = mode;
 
+  /* If min_buffers is not set, the driver either does not support the control or
+     it has not been asked yet via propose_allocation/decide_allocation. */
+  if (!v4l2object->min_buffers)
+    gst_v4l2_get_driver_min_buffers (v4l2object);
+
   /* Map the buffers */
   GST_LOG_OBJECT (v4l2object->element, "initiating buffer pool");
 
@@ -3315,7 +3344,6 @@ gst_v4l2_object_decide_allocation (GstV4l2Object * obj, GstQuery * query)
   gboolean update;
   gboolean has_video_meta;
   gboolean can_share_own_pool, pushing_from_our_pool = FALSE;
-  struct v4l2_control ctl = { 0, };
   GstAllocator *allocator = NULL;
   GstAllocationParams params = { 0 };
 
@@ -3352,16 +3380,7 @@ gst_v4l2_object_decide_allocation (GstV4l2Object * obj, GstQuery * query)
 
   can_share_own_pool = (has_video_meta || !obj->need_video_meta);
 
-  /* Certain driver may expose a minimum through controls */
-  ctl.id = V4L2_CID_MIN_BUFFERS_FOR_CAPTURE;
-  if (v4l2_ioctl (obj->video_fd, VIDIOC_G_CTRL, &ctl) >= 0) {
-    GST_DEBUG_OBJECT (obj->element, "driver require a minimum of %d buffers",
-        ctl.value);
-    obj->min_buffers = ctl.value;
-  } else {
-    obj->min_buffers = 0;
-  }
-
+  gst_v4l2_get_driver_min_buffers (obj);
   /* We can't share our own pool, if it exceed V4L2 capacity */
   if (min + obj->min_buffers + 1 > VIDEO_MAX_FRAME)
     can_share_own_pool = FALSE;
@@ -3597,7 +3616,6 @@ gst_v4l2_object_propose_allocation (GstV4l2Object * obj, GstQuery * query)
   guint size, min, max;
   GstCaps *caps;
   gboolean need_pool;
-  struct v4l2_control ctl = { 0, };
 
   /* Set defaults allocation parameters */
   size = obj->info.size;
@@ -3629,16 +3647,7 @@ gst_v4l2_object_propose_allocation (GstV4l2Object * obj, GstQuery * query)
     }
     gst_structure_free (config);
   }
-
-  /* Some devices may expose a minimum */
-  ctl.id = V4L2_CID_MIN_BUFFERS_FOR_OUTPUT;
-  if (v4l2_ioctl (obj->video_fd, VIDIOC_G_CTRL, &ctl) >= 0) {
-    GST_DEBUG_OBJECT (obj->element, "driver require a miminum of %d buffers",
-        ctl.value);
-    obj->min_buffers = ctl.value;
-  } else {
-    obj->min_buffers = 0;
-  }
+  gst_v4l2_get_driver_min_buffers (obj);
 
   min = MAX (obj->min_buffers, GST_V4L2_MIN_BUFFERS);
 
diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c
index 28a2d0fda2f22d89eaa32dd23264647068df4239..633e46fb612ed0d045ac7be3e28f5f849ad1faa8 100644
--- a/sys/v4l2/gstv4l2src.c
+++ b/sys/v4l2/gstv4l2src.c
@@ -459,9 +459,10 @@ gst_v4l2src_set_caps (GstBaseSrc * src, GstCaps * caps)
      * Basesrc will do an allocation query that
      * should indirectly reclaim buffers, after that we can
      * set the format and then configure our pool */
-    if (gst_v4l2_object_try_format (obj, caps))
+    if (gst_v4l2_object_try_format (obj, caps)) {
+      v4l2src->renegotiation_adjust = v4l2src->offset + 1;
       v4l2src->pending_set_fmt = TRUE;
-    else
+    } else
       return FALSE;
   } else {
     /* make sure we stop capturing and dealloc buffers */
@@ -588,6 +589,7 @@ gst_v4l2src_start (GstBaseSrc * src)
   GstV4l2Src *v4l2src = GST_V4L2SRC (src);
 
   v4l2src->offset = 0;
+  v4l2src->renegotiation_adjust = 0;
 
   /* activate settings for first frame */
   v4l2src->ctrl_time = 0;
@@ -675,6 +677,7 @@ gst_v4l2src_create (GstPushSrc * src, GstBuffer ** buf)
   GstClock *clock;
   GstClockTime abs_time, base_time, timestamp, duration;
   GstClockTime delay;
+  GstMessage *qos_msg;
 
   do {
     ret = GST_BASE_SRC_CLASS (parent_class)->alloc (GST_BASE_SRC (src), 0,
@@ -778,8 +781,6 @@ retry:
   }
 
   /* set buffer metadata */
-  GST_BUFFER_OFFSET (*buf) = v4l2src->offset++;
-  GST_BUFFER_OFFSET_END (*buf) = v4l2src->offset;
 
   if (G_LIKELY (abs_time != GST_CLOCK_TIME_NONE)) {
     /* the time now is the time of the clock minus the base time */
@@ -808,6 +809,32 @@ retry:
   GST_INFO_OBJECT (src, "sync to %" GST_TIME_FORMAT " out ts %" GST_TIME_FORMAT,
       GST_TIME_ARGS (v4l2src->ctrl_time), GST_TIME_ARGS (timestamp));
 
+  /* use generated offset values only if there are not already valid ones
+   * set by the v4l2 device */
+  if (!GST_BUFFER_OFFSET_IS_VALID (*buf) || !GST_BUFFER_OFFSET_END_IS_VALID (*buf)) {
+    GST_BUFFER_OFFSET (*buf) = v4l2src->offset++;
+    GST_BUFFER_OFFSET_END (*buf) = v4l2src->offset;
+  } else {
+    /* adjust raw v4l2 device sequence, will restart at null in case of renegotiation
+     * (streamoff/streamon) */
+    GST_BUFFER_OFFSET (*buf) += v4l2src->renegotiation_adjust;
+    GST_BUFFER_OFFSET_END (*buf) += v4l2src->renegotiation_adjust;
+    /* check for frame loss with given (from v4l2 device) buffer offset */
+    if ((v4l2src->offset != 0) && (GST_BUFFER_OFFSET (*buf) != (v4l2src->offset + 1))) {
+      guint64 lost_frame_count = GST_BUFFER_OFFSET (*buf) - v4l2src->offset - 1;
+      GST_WARNING_OBJECT (v4l2src,
+          "lost frames detected: count = %" G_GUINT64_FORMAT " - ts: %" GST_TIME_FORMAT,
+              lost_frame_count, GST_TIME_ARGS (timestamp));
+
+      qos_msg = gst_message_new_qos (GST_OBJECT_CAST (v4l2src), TRUE,
+          GST_CLOCK_TIME_NONE, GST_CLOCK_TIME_NONE, timestamp,
+          GST_CLOCK_TIME_IS_VALID (duration) ? lost_frame_count * duration : GST_CLOCK_TIME_NONE);
+      gst_element_post_message (GST_ELEMENT_CAST (v4l2src), qos_msg);
+
+    }
+    v4l2src->offset = GST_BUFFER_OFFSET (*buf);
+  }
+
   GST_BUFFER_TIMESTAMP (*buf) = timestamp;
   GST_BUFFER_DURATION (*buf) = duration;
 
diff --git a/sys/v4l2/gstv4l2src.h b/sys/v4l2/gstv4l2src.h
index 79dec17e0d532c70e9c1cda0d1b19f3b18083b2e..90a0dd6ecd81c290f62439d270012db786784153 100644
--- a/sys/v4l2/gstv4l2src.h
+++ b/sys/v4l2/gstv4l2src.h
@@ -59,6 +59,9 @@ struct _GstV4l2Src
 
   guint64 offset;
 
+  /* offset adjust after renegotiation */
+  guint64 renegotiation_adjust;
+
   GstClockTime ctrl_time;
 
   gboolean pending_set_fmt;
diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c
index d1cc2842dbbae55b9a0285eb2424f2a6921d136b..356d42f08fb99eda0cedecc69ff3eb55241ed8af 100644
--- a/sys/v4l2/v4l2_calls.c
+++ b/sys/v4l2/v4l2_calls.c
@@ -842,7 +842,7 @@ gst_v4l2_set_frequency (GstV4l2Object * v4l2object,
 
   freq.tuner = tunernum;
   /* fill in type - ignore error */
-  v4l2_ioctl (v4l2object->video_fd, VIDIOC_G_FREQUENCY, &freq);
+  (void) v4l2_ioctl (v4l2object->video_fd, VIDIOC_G_FREQUENCY, &freq);
   freq.frequency = frequency / channel->freq_multiplicator;
 
   if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_S_FREQUENCY, &freq) < 0)
diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
index 407e11ff435767d2300662c3ced192640a918df7..a64f285ab11addd4c54ea030485ff311624083b7 100644
--- a/tests/check/Makefile.am
+++ b/tests/check/Makefile.am
@@ -6,7 +6,7 @@ TEST_FILES_DIRECTORY = $(top_srcdir)/tests/files
 REGISTRY_ENVIRONMENT = \
 	GST_REGISTRY_1_0=$(CHECK_REGISTRY)
 
-TESTS_ENVIRONMENT = \
+AM_TESTS_ENVIRONMENT = \
 	$(REGISTRY_ENVIRONMENT)					\
 	GST_PLUGIN_SYSTEM_PATH_1_0=				\
 	GST_PLUGIN_PATH_1_0=$(top_builddir)/gst:$(top_builddir)/ext:$(top_builddir)/sys:$(GSTPB_PLUGINS_DIR):$(GST_PLUGINS_DIR)			\
@@ -37,7 +37,9 @@ clean-local: clean-local-check
 distclean-local: distclean-local-orc
 
 if USE_PLUGIN_ALPHA
-check_alpha = elements/alphacolor
+check_alpha = \
+	elements/alphacolor \
+	elements/alpha
 else
 check_alpha =
 endif
@@ -392,6 +394,7 @@ TESTS = $(check_PROGRAMS)
 
 AM_CFLAGS = $(GST_OBJ_CFLAGS) $(GST_CHECK_CFLAGS) $(CHECK_CFLAGS) \
 	$(GST_OPTION_CFLAGS) $(GST_CFLAGS) -DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
+	-DGST_CHECK_TEST_ENVIRONMENT_BEACON="\"GST_PLUGIN_LOADING_WHITELIST\"" \
 	-UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
 LDADD = $(GST_OBJ_LIBS) $(GST_CHECK_LIBS) $(CHECK_LIBS)
 
@@ -472,6 +475,7 @@ elements_spectrum_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
 elements_spectrum_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) $(LDADD)
 
 elements_alphacolor_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+elements_alpha_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
 
 elements_deinterlace_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
 elements_deinterlace_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(LDADD)
diff --git a/tests/check/Makefile.in b/tests/check/Makefile.in
index edc6845df886e91fb11d27ba685b9cbbe2ee34e4..ea362b58f57d00ca7f945cad3a40e8c705eeda31 100644
--- a/tests/check/Makefile.in
+++ b/tests/check/Makefile.in
@@ -151,7 +151,8 @@ am__v_lt_1 =
 libparser_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libparser_la_CFLAGS) \
 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-@USE_PLUGIN_ALPHA_TRUE@am__EXEEXT_1 = elements/alphacolor$(EXEEXT)
+@USE_PLUGIN_ALPHA_TRUE@am__EXEEXT_1 = elements/alphacolor$(EXEEXT) \
+@USE_PLUGIN_ALPHA_TRUE@	elements/alpha$(EXEEXT)
 @USE_PLUGIN_AUDIOFX_TRUE@am__EXEEXT_2 =  \
 @USE_PLUGIN_AUDIOFX_TRUE@	elements/audioamplify$(EXEEXT) \
 @USE_PLUGIN_AUDIOFX_TRUE@	elements/audiochebband$(EXEEXT) \
@@ -254,6 +255,14 @@ elements_aacparse_DEPENDENCIES = libparser.la $(am__DEPENDENCIES_2)
 elements_ac3parse_SOURCES = elements/ac3parse.c
 elements_ac3parse_OBJECTS = elements/ac3parse.$(OBJEXT)
 elements_ac3parse_DEPENDENCIES = libparser.la $(am__DEPENDENCIES_2)
+elements_alpha_SOURCES = elements/alpha.c
+elements_alpha_OBJECTS = elements/elements_alpha-alpha.$(OBJEXT)
+elements_alpha_LDADD = $(LDADD)
+elements_alpha_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_alpha_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(elements_alpha_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
+	$@
 elements_alphacolor_SOURCES = elements/alphacolor.c
 elements_alphacolor_OBJECTS =  \
 	elements/elements_alphacolor-alphacolor.$(OBJEXT)
@@ -854,18 +863,19 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
 SOURCES = $(libparser_la_SOURCES) elements/aacparse.c \
-	elements/ac3parse.c elements/alphacolor.c elements/amrparse.c \
-	elements/apev2mux.c elements/aspectratiocrop.c \
-	elements/audioamplify.c elements/audiochebband.c \
-	elements/audiocheblimit.c elements/audiodynamic.c \
-	elements/audioecho.c elements/audiofirfilter.c \
-	elements/audioiirfilter.c elements/audioinvert.c \
-	elements/audiopanorama.c elements/audiowsincband.c \
-	elements/audiowsinclimit.c elements/autodetect.c \
-	elements/avimux.c elements/avisubtitle.c elements/capssetter.c \
-	elements/deinterlace.c elements/deinterleave.c elements/dtmf.c \
-	elements/equalizer.c elements/flacparse.c elements/flvdemux.c \
-	elements/flvmux.c elements/gdkpixbufsink.c elements/icydemux.c \
+	elements/ac3parse.c elements/alpha.c elements/alphacolor.c \
+	elements/amrparse.c elements/apev2mux.c \
+	elements/aspectratiocrop.c elements/audioamplify.c \
+	elements/audiochebband.c elements/audiocheblimit.c \
+	elements/audiodynamic.c elements/audioecho.c \
+	elements/audiofirfilter.c elements/audioiirfilter.c \
+	elements/audioinvert.c elements/audiopanorama.c \
+	elements/audiowsincband.c elements/audiowsinclimit.c \
+	elements/autodetect.c elements/avimux.c elements/avisubtitle.c \
+	elements/capssetter.c elements/deinterlace.c \
+	elements/deinterleave.c elements/dtmf.c elements/equalizer.c \
+	elements/flacparse.c elements/flvdemux.c elements/flvmux.c \
+	elements/gdkpixbufsink.c elements/icydemux.c \
 	elements/id3demux.c elements/id3v2mux.c elements/imagefreeze.c \
 	elements/interleave.c elements/jpegdec.c elements/jpegenc.c \
 	elements/level.c elements/matroskamux.c \
@@ -890,18 +900,19 @@ SOURCES = $(libparser_la_SOURCES) elements/aacparse.c \
 	pipelines/tagschecking.c pipelines/wavenc.c \
 	pipelines/wavpack.c
 DIST_SOURCES = $(libparser_la_SOURCES) elements/aacparse.c \
-	elements/ac3parse.c elements/alphacolor.c elements/amrparse.c \
-	elements/apev2mux.c elements/aspectratiocrop.c \
-	elements/audioamplify.c elements/audiochebband.c \
-	elements/audiocheblimit.c elements/audiodynamic.c \
-	elements/audioecho.c elements/audiofirfilter.c \
-	elements/audioiirfilter.c elements/audioinvert.c \
-	elements/audiopanorama.c elements/audiowsincband.c \
-	elements/audiowsinclimit.c elements/autodetect.c \
-	elements/avimux.c elements/avisubtitle.c elements/capssetter.c \
-	elements/deinterlace.c elements/deinterleave.c elements/dtmf.c \
-	elements/equalizer.c elements/flacparse.c elements/flvdemux.c \
-	elements/flvmux.c elements/gdkpixbufsink.c elements/icydemux.c \
+	elements/ac3parse.c elements/alpha.c elements/alphacolor.c \
+	elements/amrparse.c elements/apev2mux.c \
+	elements/aspectratiocrop.c elements/audioamplify.c \
+	elements/audiochebband.c elements/audiocheblimit.c \
+	elements/audiodynamic.c elements/audioecho.c \
+	elements/audiofirfilter.c elements/audioiirfilter.c \
+	elements/audioinvert.c elements/audiopanorama.c \
+	elements/audiowsincband.c elements/audiowsinclimit.c \
+	elements/autodetect.c elements/avimux.c elements/avisubtitle.c \
+	elements/capssetter.c elements/deinterlace.c \
+	elements/deinterleave.c elements/dtmf.c elements/equalizer.c \
+	elements/flacparse.c elements/flvdemux.c elements/flvmux.c \
+	elements/gdkpixbufsink.c elements/icydemux.c \
 	elements/id3demux.c elements/id3v2mux.c elements/imagefreeze.c \
 	elements/interleave.c elements/jpegdec.c elements/jpegenc.c \
 	elements/level.c elements/matroskamux.c \
@@ -1482,7 +1493,7 @@ TEST_FILES_DIRECTORY = $(top_srcdir)/tests/files
 REGISTRY_ENVIRONMENT = \
 	GST_REGISTRY_1_0=$(CHECK_REGISTRY)
 
-TESTS_ENVIRONMENT = \
+AM_TESTS_ENVIRONMENT = \
 	$(REGISTRY_ENVIRONMENT)					\
 	GST_PLUGIN_SYSTEM_PATH_1_0=				\
 	GST_PLUGIN_PATH_1_0=$(top_builddir)/gst:$(top_builddir)/ext:$(top_builddir)/sys:$(GSTPB_PLUGINS_DIR):$(GST_PLUGINS_DIR)			\
@@ -1510,7 +1521,10 @@ TESTS_ENVIRONMENT = \
 # the core dumps of some machines have PIDs appended
 CLEANFILES = core.* test-registry.*
 @USE_PLUGIN_ALPHA_FALSE@check_alpha = 
-@USE_PLUGIN_ALPHA_TRUE@check_alpha = elements/alphacolor
+@USE_PLUGIN_ALPHA_TRUE@check_alpha = \
+@USE_PLUGIN_ALPHA_TRUE@	elements/alphacolor \
+@USE_PLUGIN_ALPHA_TRUE@	elements/alpha
+
 @USE_PLUGIN_AUDIOFX_FALSE@check_audiofx = 
 @USE_PLUGIN_AUDIOFX_TRUE@check_audiofx = \
 @USE_PLUGIN_AUDIOFX_TRUE@	elements/audioamplify \
@@ -1662,6 +1676,7 @@ VALGRIND_TO_FIX = \
 TESTS = $(check_PROGRAMS)
 AM_CFLAGS = $(GST_OBJ_CFLAGS) $(GST_CHECK_CFLAGS) $(CHECK_CFLAGS) \
 	$(GST_OPTION_CFLAGS) $(GST_CFLAGS) -DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
+	-DGST_CHECK_TEST_ENVIRONMENT_BEACON="\"GST_PLUGIN_LOADING_WHITELIST\"" \
 	-UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
 
 LDADD = $(GST_OBJ_LIBS) $(GST_CHECK_LIBS) $(CHECK_LIBS)
@@ -1725,6 +1740,7 @@ elements_rgvolume_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION)
 elements_spectrum_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
 elements_spectrum_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) $(LDADD)
 elements_alphacolor_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+elements_alpha_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
 elements_deinterlace_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
 elements_deinterlace_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(LDADD)
 elements_dtmf_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
@@ -1895,6 +1911,12 @@ elements/ac3parse.$(OBJEXT): elements/$(am__dirstamp) \
 elements/ac3parse$(EXEEXT): $(elements_ac3parse_OBJECTS) $(elements_ac3parse_DEPENDENCIES) $(EXTRA_elements_ac3parse_DEPENDENCIES) elements/$(am__dirstamp)
 	@rm -f elements/ac3parse$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(elements_ac3parse_OBJECTS) $(elements_ac3parse_LDADD) $(LIBS)
+elements/elements_alpha-alpha.$(OBJEXT): elements/$(am__dirstamp) \
+	elements/$(DEPDIR)/$(am__dirstamp)
+
+elements/alpha$(EXEEXT): $(elements_alpha_OBJECTS) $(elements_alpha_DEPENDENCIES) $(EXTRA_elements_alpha_DEPENDENCIES) elements/$(am__dirstamp)
+	@rm -f elements/alpha$(EXEEXT)
+	$(AM_V_CCLD)$(elements_alpha_LINK) $(elements_alpha_OBJECTS) $(elements_alpha_LDADD) $(LIBS)
 elements/elements_alphacolor-alphacolor.$(OBJEXT):  \
 	elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp)
 
@@ -2426,6 +2448,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/avimux.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/avisubtitle.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/capssetter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_alpha-alpha.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_alphacolor-alphacolor.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_aspectratiocrop-aspectratiocrop.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_audioamplify-audioamplify.Po@am__quote@
@@ -2534,6 +2557,20 @@ elements/libparser_la-parser.lo: elements/parser.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libparser_la_CFLAGS) $(CFLAGS) -c -o elements/libparser_la-parser.lo `test -f 'elements/parser.c' || echo '$(srcdir)/'`elements/parser.c
 
+elements/elements_alpha-alpha.o: elements/alpha.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_alpha_CFLAGS) $(CFLAGS) -MT elements/elements_alpha-alpha.o -MD -MP -MF elements/$(DEPDIR)/elements_alpha-alpha.Tpo -c -o elements/elements_alpha-alpha.o `test -f 'elements/alpha.c' || echo '$(srcdir)/'`elements/alpha.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_alpha-alpha.Tpo elements/$(DEPDIR)/elements_alpha-alpha.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='elements/alpha.c' object='elements/elements_alpha-alpha.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_alpha_CFLAGS) $(CFLAGS) -c -o elements/elements_alpha-alpha.o `test -f 'elements/alpha.c' || echo '$(srcdir)/'`elements/alpha.c
+
+elements/elements_alpha-alpha.obj: elements/alpha.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_alpha_CFLAGS) $(CFLAGS) -MT elements/elements_alpha-alpha.obj -MD -MP -MF elements/$(DEPDIR)/elements_alpha-alpha.Tpo -c -o elements/elements_alpha-alpha.obj `if test -f 'elements/alpha.c'; then $(CYGPATH_W) 'elements/alpha.c'; else $(CYGPATH_W) '$(srcdir)/elements/alpha.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_alpha-alpha.Tpo elements/$(DEPDIR)/elements_alpha-alpha.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='elements/alpha.c' object='elements/elements_alpha-alpha.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_alpha_CFLAGS) $(CFLAGS) -c -o elements/elements_alpha-alpha.obj `if test -f 'elements/alpha.c'; then $(CYGPATH_W) 'elements/alpha.c'; else $(CYGPATH_W) '$(srcdir)/elements/alpha.c'; fi`
+
 elements/elements_alphacolor-alphacolor.o: elements/alphacolor.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_alphacolor_CFLAGS) $(CFLAGS) -MT elements/elements_alphacolor-alphacolor.o -MD -MP -MF elements/$(DEPDIR)/elements_alphacolor-alphacolor.Tpo -c -o elements/elements_alphacolor-alphacolor.o `test -f 'elements/alphacolor.c' || echo '$(srcdir)/'`elements/alphacolor.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_alphacolor-alphacolor.Tpo elements/$(DEPDIR)/elements_alphacolor-alphacolor.Po
@@ -3451,6 +3488,13 @@ elements/alphacolor.log: elements/alphacolor$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+elements/alpha.log: elements/alpha$(EXEEXT)
+	@p='elements/alpha$(EXEEXT)'; \
+	b='elements/alpha'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 elements/audioamplify.log: elements/audioamplify$(EXEEXT)
 	@p='elements/audioamplify$(EXEEXT)'; \
 	b='elements/audioamplify'; \
@@ -4208,38 +4252,38 @@ LOOPS ?= 10
 # run any given test by running make test.check
 # if the test fails, run it again at at least debug level 2
 %.check: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$* ||							\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	GST_DEBUG=$$GST_DEBUG,*:2				\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*
 
 # just like 'check', but don't run it again if it fails (useful for debugging)
 %.check-norepeat: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*
 
 # run any given test in a loop
 %.torture: %
 	@for i in `seq 1 $(LOOPS)`; do				\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*; done
 
 # run any given test in an infinite loop
 %.forever: %
 	@while true; do						\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$* || break; done
 
 # valgrind any given test by running make test.valgrind
 %.valgrind: %
 	@valgrind_log=$(subst /,-,$*-valgrind.log);		\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=360					\
 	G_SLICE=always-malloc					\
 	$(LIBTOOL) --mode=execute				\
@@ -4257,7 +4301,7 @@ LOOPS ?= 10
 
 # valgrind any given test and generate suppressions for it
 %.valgrind.gen-suppressions: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=360					\
 	G_SLICE=always-malloc					\
 	$(LIBTOOL) --mode=execute				\
@@ -4287,7 +4331,7 @@ LOOPS ?= 10
 
 # gdb any given test by running make test.gdb
 %.gdb: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_FORK=no						\
 	$(LIBTOOL) --mode=execute				\
 	gdb $*
@@ -4391,7 +4435,7 @@ valgrind.gen-suppressions: $(TESTS)
 	fi
 inspect:
 	@echo "Inspecting features ..."
-	@for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 	\
+	@for e in `$(AM_TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 	\
 	  | cut -d: -f2`;						\
 	  do echo Inspecting $$e;					\
 	     $(GST_INSPECT) $$e > /dev/null 2>&1; done
diff --git a/tests/check/elements/alpha.c b/tests/check/elements/alpha.c
new file mode 100644
index 0000000000000000000000000000000000000000..7c03bc123206c4c7733a5713437c341a02acf9b1
--- /dev/null
+++ b/tests/check/elements/alpha.c
@@ -0,0 +1,265 @@
+/* GStreamer unit test for the alpha element
+ *
+ * Copyright (C) 2007 Ravi Kiran K N <ravi.kiran@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+#include <gst/video/video.h>
+
+
+GstPad *srcpad, *sinkpad;
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("AYUV"))
+    );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ AYUV, "
+            "ARGB, BGRA, ABGR, RGBA, Y444, xRGB, BGRx, xBGR, "
+            "RGBx, RGB, BGR, Y42B, YUY2, YVYU, UYVY, I420, YV12, Y41B } "))
+    );
+
+
+typedef enum
+{
+  FILL_GREEN,
+  FILL_BLUE
+}
+FillColor;
+
+static GstElement *
+setup_alpha (void)
+{
+  GstElement *alpha;
+
+  alpha = gst_check_setup_element ("alpha");
+  srcpad = gst_check_setup_src_pad (alpha, &srctemplate);
+  sinkpad = gst_check_setup_sink_pad (alpha, &sinktemplate);
+
+  gst_pad_set_active (srcpad, TRUE);
+  gst_pad_set_active (sinkpad, TRUE);
+
+  return alpha;
+}
+
+static void
+cleanup_alpha (GstElement * alpha)
+{
+  gst_pad_set_active (srcpad, FALSE);
+  gst_pad_set_active (sinkpad, FALSE);
+  gst_check_teardown_src_pad (alpha);
+  gst_check_teardown_sink_pad (alpha);
+  gst_check_teardown_element (alpha);
+}
+
+#define WIDTH 3
+#define HEIGHT 4
+
+static GstCaps *
+create_caps_rgba32 (void)
+{
+  GstCaps *caps;
+
+  caps = gst_caps_new_simple ("video/x-raw",
+      "width", G_TYPE_INT, WIDTH,
+      "height", G_TYPE_INT, HEIGHT,
+      "framerate", GST_TYPE_FRACTION, 0, 1,
+      "format", G_TYPE_STRING, "RGBA", NULL);
+
+  return caps;
+}
+
+static GstBuffer *
+create_buffer_rgba32 (FillColor color)
+{
+  guint8 rgba32_img[HEIGHT * WIDTH * 4];
+  guint32 *rgba32 = (guint32 *) rgba32_img;
+
+  GstBuffer *buf;
+  GstMapInfo map;
+  guint32 rgba_col;
+  int i;
+
+  if (color == FILL_GREEN)
+    rgba_col = 0xff00ff00;      /* GREEN */
+  else
+    rgba_col = 0xffff0000;      /* BLUE */
+
+  for (i = 0; i < HEIGHT * WIDTH; i++)
+    rgba32[i] = rgba_col;
+
+  buf = gst_buffer_new_and_alloc (HEIGHT * WIDTH * 4);
+  gst_buffer_map (buf, &map, GST_MAP_READWRITE);
+  fail_unless_equals_int (map.size, sizeof (rgba32_img));
+  memcpy (map.data, rgba32_img, sizeof (rgba32_img));
+
+  gst_buffer_unmap (buf, &map);
+
+  return buf;
+}
+
+
+GST_START_TEST (test_chromakeying)
+{
+  GstElement *alpha;
+  GstBuffer *inbuffer;
+  GstBuffer *outbuffer;
+  GstCaps *incaps;
+  guint8 *ayuv;
+  guint outlength;
+  GstMapInfo map;
+  int i;
+
+  incaps = create_caps_rgba32 ();
+
+  alpha = setup_alpha ();
+
+  g_object_set (alpha, "method", 1, NULL);      /* Chroma-keying GREEN */
+
+  fail_unless_equals_int (gst_element_set_state (alpha, GST_STATE_PLAYING),
+      GST_STATE_CHANGE_SUCCESS);
+
+  gst_check_setup_events (srcpad, alpha, incaps, GST_FORMAT_TIME);
+
+  inbuffer = create_buffer_rgba32 (FILL_GREEN);
+  GST_DEBUG ("Created buffer of %" G_GSIZE_FORMAT " bytes",
+      gst_buffer_get_size (inbuffer));
+  ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+  fail_unless_equals_int (gst_pad_push (srcpad, inbuffer), GST_FLOW_OK);
+
+  fail_unless (g_list_length (buffers) == 1);
+  outbuffer = (GstBuffer *) buffers->data;
+  fail_if (outbuffer == NULL);
+  fail_unless (GST_IS_BUFFER (outbuffer));
+
+  ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
+  outlength = WIDTH * HEIGHT * 4;       /* output is AYUV */
+  gst_buffer_map (outbuffer, &map, GST_MAP_READ);
+  fail_unless_equals_int (map.size, outlength);
+
+  ayuv = map.data;
+
+  /* check chroma keying GREEN */
+  for (i = 0; i < HEIGHT * WIDTH; i += 4)
+    fail_unless_equals_int (ayuv[i], 0x00);
+
+  gst_buffer_unmap (outbuffer, &map);
+
+  buffers = g_list_remove (buffers, outbuffer);
+  gst_buffer_unref (outbuffer);
+
+  fail_unless_equals_int (gst_element_set_state (alpha, GST_STATE_NULL),
+      GST_STATE_CHANGE_SUCCESS);
+
+  /* cleanup */
+  cleanup_alpha (alpha);
+  ASSERT_CAPS_REFCOUNT (incaps, "incaps", 1);
+  gst_caps_unref (incaps);
+
+}
+
+GST_END_TEST;
+
+
+
+GST_START_TEST (test_alpha)
+{
+  GstElement *alpha;
+  GstBuffer *inbuffer;
+  GstBuffer *outbuffer;
+  GstCaps *incaps;
+  guint8 *ayuv;
+  guint outlength;
+  GstMapInfo map;
+  int i;
+
+  incaps = create_caps_rgba32 ();
+
+  alpha = setup_alpha ();
+
+  g_object_set (alpha, "alpha", 0.5, NULL);     /* Alpha value 0.5 */
+
+  fail_unless_equals_int (gst_element_set_state (alpha, GST_STATE_PLAYING),
+      GST_STATE_CHANGE_SUCCESS);
+
+  gst_check_setup_events (srcpad, alpha, incaps, GST_FORMAT_TIME);
+
+  inbuffer = create_buffer_rgba32 (FILL_BLUE);
+  GST_DEBUG ("Created buffer of %" G_GSIZE_FORMAT " bytes",
+      gst_buffer_get_size (inbuffer));
+  ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+  /* pushing gives away reference */
+  GST_DEBUG ("push it");
+  fail_unless_equals_int (gst_pad_push (srcpad, inbuffer), GST_FLOW_OK);
+  GST_DEBUG ("pushed it");
+
+  /* ... and puts a new buffer on the global list */
+  fail_unless (g_list_length (buffers) == 1);
+  outbuffer = (GstBuffer *) buffers->data;
+  fail_if (outbuffer == NULL);
+  fail_unless (GST_IS_BUFFER (outbuffer));
+
+  ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
+  outlength = WIDTH * HEIGHT * 4;       /* output is AYUV */
+  gst_buffer_map (outbuffer, &map, GST_MAP_READ);
+  fail_unless_equals_int (map.size, outlength);
+
+  ayuv = map.data;
+
+  for (i = 0; i < HEIGHT * WIDTH; i += 4)
+    fail_unless_equals_int (ayuv[i], 0x7F);
+
+  gst_buffer_unmap (outbuffer, &map);
+
+  buffers = g_list_remove (buffers, outbuffer);
+  gst_buffer_unref (outbuffer);
+
+  fail_unless_equals_int (gst_element_set_state (alpha, GST_STATE_NULL),
+      GST_STATE_CHANGE_SUCCESS);
+
+  /* cleanup */
+  GST_DEBUG ("cleanup alpha");
+  cleanup_alpha (alpha);
+  GST_DEBUG ("cleanup, unref incaps");
+  ASSERT_CAPS_REFCOUNT (incaps, "incaps", 1);
+  gst_caps_unref (incaps);
+
+}
+
+GST_END_TEST;
+
+
+static Suite *
+alpha_suite (void)
+{
+  Suite *s = suite_create ("alpha");
+  TCase *tc_chain = tcase_create ("general");
+
+  suite_add_tcase (s, tc_chain);
+  tcase_add_test (tc_chain, test_alpha);
+  tcase_add_test (tc_chain, test_chromakeying);
+
+  return s;
+}
+
+GST_CHECK_MAIN (alpha);
diff --git a/tests/check/elements/multifile.c b/tests/check/elements/multifile.c
index 20770bb8fd49ee7959be0cb47dd298415bd4b4f5..68717dcd409c7c197ab38b9915df02152db7d190 100644
--- a/tests/check/elements/multifile.c
+++ b/tests/check/elements/multifile.c
@@ -30,14 +30,64 @@
 #include <stdlib.h>
 #include <unistd.h>
 
+static GList *mfs_messages = NULL;
+
+static void
+mfs_check_next_message (const gchar * filename)
+{
+  GstMessage *msg;
+  const gchar *msg_filename;
+  const GstStructure *structure;
+
+  fail_unless (mfs_messages != NULL);
+
+  msg = mfs_messages->data;
+  mfs_messages = g_list_delete_link (mfs_messages, mfs_messages);
+
+  structure = gst_message_get_structure (msg);
+
+  msg_filename = gst_structure_get_string (structure, "filename");
+
+  fail_unless (strcmp (filename, msg_filename) == 0);
+
+  gst_message_unref (msg);
+}
+
 static void
 run_pipeline (GstElement * pipeline)
 {
+  GstMessage *msg;
+  GstBus *bus;
+
+  bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+
   gst_element_set_state (pipeline, GST_STATE_PAUSED);
   gst_element_get_state (pipeline, NULL, NULL, -1);
   gst_element_set_state (pipeline, GST_STATE_PLAYING);
-  /* FIXME too lazy */
-  g_usleep (1000000);
+
+  while (1) {
+    msg =
+        gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
+        GST_MESSAGE_EOS | GST_MESSAGE_ERROR | GST_MESSAGE_ELEMENT);
+
+    fail_unless (msg != NULL);
+    if (msg) {
+      if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ELEMENT) {
+        if (gst_message_has_name (msg, "GstMultiFileSink"))
+          mfs_messages = g_list_append (mfs_messages, msg);
+        else
+          gst_message_unref (msg);
+
+        continue;
+      }
+
+      fail_unless (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_EOS);
+      gst_message_unref (msg);
+    }
+    break;
+  }
+
+  gst_object_unref (bus);
   gst_element_set_state (pipeline, GST_STATE_NULL);
 }
 
@@ -64,7 +114,8 @@ GST_START_TEST (test_multifilesink_key_frame)
   mfs = gst_bin_get_by_name (GST_BIN (pipeline), "mfs");
   fail_if (mfs == NULL);
   mfs_pattern = g_build_filename (my_tmpdir, "%05d", NULL);
-  g_object_set (G_OBJECT (mfs), "location", mfs_pattern, NULL);
+  g_object_set (G_OBJECT (mfs), "location", mfs_pattern, "post-messages", TRUE,
+      NULL);
   g_object_unref (mfs);
   run_pipeline (pipeline);
   gst_object_unref (pipeline);
@@ -74,10 +125,14 @@ GST_START_TEST (test_multifilesink_key_frame)
 
     s = g_strdup_printf (mfs_pattern, i);
     fail_if (g_remove (s) != 0);
+
+    mfs_check_next_message (s);
+
     g_free (s);
   }
   fail_if (g_remove (my_tmpdir) != 0);
 
+  fail_unless (mfs_messages == NULL);
   g_free (mfs_pattern);
   g_free (my_tmpdir);
 }
@@ -145,6 +200,7 @@ GST_START_TEST (test_multifilesink_key_unit)
   GstBuffer *buf;
   GstPad *sink;
   GstSegment segment;
+  GstBus *bus;
 
   tmpdir = g_get_tmp_dir ();
   template = g_build_filename (tmpdir, "multifile-test-XXXXXX", NULL);
@@ -154,7 +210,10 @@ GST_START_TEST (test_multifilesink_key_unit)
   mfs = gst_element_factory_make ("multifilesink", NULL);
   fail_if (mfs == NULL);
   mfs_pattern = g_build_filename (my_tmpdir, "%05d", NULL);
-  g_object_set (G_OBJECT (mfs), "location", mfs_pattern, "next-file", 3, NULL);
+  g_object_set (G_OBJECT (mfs), "location", mfs_pattern, "next-file", 3,
+      "post-messages", TRUE, NULL);
+  bus = gst_bus_new ();
+  gst_element_set_bus (mfs, bus);
   fail_if (gst_element_set_state (mfs,
           GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE);
 
@@ -179,18 +238,32 @@ GST_START_TEST (test_multifilesink_key_unit)
   gst_buffer_fill (buf, 0, "baz", 4);
   fail_if (gst_pad_chain (sink, buf) != GST_FLOW_OK);
 
+  gst_pad_send_event (sink, gst_event_new_eos ());
+
   fail_if (gst_element_set_state (mfs,
           GST_STATE_NULL) == GST_STATE_CHANGE_FAILURE);
+  gst_element_set_bus (mfs, NULL);
 
   for (i = 0; i < 2; i++) {
     char *s;
+    GstMessage *msg;
 
     s = g_strdup_printf (mfs_pattern, i);
     fail_if (g_remove (s) != 0);
+
+    msg = gst_bus_pop_filtered (bus, GST_MESSAGE_ELEMENT);
+    fail_unless (msg != NULL);
+    fail_unless (gst_message_has_name (msg, "GstMultiFileSink"));
+    fail_unless (strcmp (s,
+            gst_structure_get_string (gst_message_get_structure (msg),
+                "filename")) == 0);
+
+    gst_message_unref (msg);
     g_free (s);
   }
   fail_if (g_remove (my_tmpdir) != 0);
 
+  gst_object_unref (bus);
   g_free (mfs_pattern);
   g_free (my_tmpdir);
   gst_object_unref (sink);
diff --git a/tests/check/elements/qtmux.c b/tests/check/elements/qtmux.c
index 105b1e80db10066f50305f6819f85065e10a3bbc..39c7c5effb5313ed08e4123d8807373653ef3d5e 100644
--- a/tests/check/elements/qtmux.c
+++ b/tests/check/elements/qtmux.c
@@ -38,6 +38,8 @@
  * get_peer, and then remove references in every test function */
 static GstPad *mysrcpad, *mysinkpad;
 
+#define VIDEO_RAW_CAPS_STRING "video/x-raw"
+
 #define AUDIO_CAPS_STRING "audio/mpeg, " \
                         "mpegversion = (int) 1, " \
                         "layer = (int) 3, " \
@@ -78,6 +80,7 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("video/quicktime"));
+
 static GstStaticPadTemplate srcvideotemplate = GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
@@ -89,6 +92,12 @@ GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS (VIDEO_CAPS_H264_STRING));
 
+static GstStaticPadTemplate srcvideorawtemplate =
+GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (VIDEO_RAW_CAPS_STRING));
+
 static GstStaticPadTemplate srcaudiotemplate = GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
@@ -153,8 +162,24 @@ teardown_src_pad (GstPad * srcpad)
   gst_object_unref (srcpad);
 }
 
+gboolean downstream_is_seekable;
+static gboolean
+qtmux_sinkpad_query (GstPad * pad, GstObject * parent, GstQuery * query)
+{
+  gboolean ret = FALSE;
+
+  if (GST_QUERY_TYPE (query) == GST_QUERY_SEEKING) {
+    gst_query_set_seeking (query, GST_FORMAT_BYTES, downstream_is_seekable, 0,
+        -1);
+    ret = TRUE;
+  }
+
+  return ret;
+}
+
 static GstElement *
-setup_qtmux (GstStaticPadTemplate * srctemplate, const gchar * sinkname)
+setup_qtmux (GstStaticPadTemplate * srctemplate, const gchar * sinkname,
+    gboolean seekable)
 {
   GstElement *qtmux;
 
@@ -162,6 +187,10 @@ setup_qtmux (GstStaticPadTemplate * srctemplate, const gchar * sinkname)
   qtmux = gst_check_setup_element ("qtmux");
   mysrcpad = setup_src_pad (qtmux, srctemplate, sinkname);
   mysinkpad = gst_check_setup_sink_pad (qtmux, &sinktemplate);
+
+  downstream_is_seekable = seekable;
+  gst_pad_set_query_function (mysinkpad, qtmux_sinkpad_query);
+
   gst_pad_set_active (mysrcpad, TRUE);
   gst_pad_set_active (mysinkpad, TRUE);
 
@@ -195,7 +224,7 @@ check_qtmux_pad (GstStaticPadTemplate * srctemplate, const gchar * sinkname,
   guint8 data2[4] = "moov";
   GstSegment segment;
 
-  qtmux = setup_qtmux (srctemplate, sinkname);
+  qtmux = setup_qtmux (srctemplate, sinkname, TRUE);
   g_object_set (qtmux, "dts-method", dts_method, NULL);
   fail_unless (gst_element_set_state (qtmux,
           GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
@@ -285,7 +314,7 @@ check_qtmux_pad_fragmented (GstStaticPadTemplate * srctemplate,
   guint8 data4[4] = "mfra";
   GstSegment segment;
 
-  qtmux = setup_qtmux (srctemplate, sinkname);
+  qtmux = setup_qtmux (srctemplate, sinkname, !streamable);
   g_object_set (qtmux, "dts-method", dts_method, NULL);
   g_object_set (qtmux, "fragment-duration", 2000, NULL);
   g_object_set (qtmux, "streamable", streamable, NULL);
@@ -515,7 +544,7 @@ GST_END_TEST;
 
 GST_START_TEST (test_reuse)
 {
-  GstElement *qtmux = setup_qtmux (&srcvideotemplate, "video_%u");
+  GstElement *qtmux = setup_qtmux (&srcvideotemplate, "video_%u", TRUE);
   GstBuffer *inbuffer;
   GstCaps *caps;
   GstSegment segment;
@@ -888,6 +917,468 @@ GST_START_TEST (test_average_bitrate)
 
 GST_END_TEST;
 
+struct TestInputData
+{
+  GstPad *srcpad;
+  GstSegment segment;
+  GList *input;
+  GThread *thread;
+
+  /* When comparing ts, the input will be subtracted from this */
+  gint64 ts_offset;
+
+  GstPad *sinkpad;
+
+  GList *output_iter;
+};
+
+static void
+test_input_data_init (struct TestInputData *data)
+{
+  data->ts_offset = 0;
+  data->srcpad = NULL;
+  data->sinkpad = NULL;
+  data->input = NULL;
+  data->thread = NULL;
+}
+
+static void
+test_input_data_clean (struct TestInputData *data)
+{
+  g_list_free_full (data->input, (GDestroyNotify) gst_mini_object_unref);
+
+  if (data->sinkpad) {
+    gst_pad_set_active (data->sinkpad, FALSE);
+    gst_object_unref (data->sinkpad);
+  }
+
+  gst_pad_set_active (data->srcpad, FALSE);
+  teardown_src_pad (data->srcpad);
+}
+
+static gpointer
+test_input_push_data (gpointer user_data)
+{
+  struct TestInputData *data = user_data;
+  GList *iter;
+  GstFlowReturn flow;
+
+  for (iter = data->input; iter; iter = g_list_next (iter)) {
+    if (GST_IS_BUFFER (iter->data)) {
+      GST_INFO ("Pushing buffer %" GST_PTR_FORMAT " on pad: %s:%s", iter->data,
+          GST_DEBUG_PAD_NAME (data->srcpad));
+      flow =
+          gst_pad_push (data->srcpad,
+          gst_buffer_ref ((GstBuffer *) iter->data));
+      fail_unless (flow == GST_FLOW_OK);
+    } else {
+      GST_INFO_OBJECT (data->srcpad, "Pushing event: %"
+          GST_PTR_FORMAT, iter->data);
+      fail_unless (gst_pad_push_event (data->srcpad,
+              gst_event_ref ((GstEvent *) iter->data)) == TRUE);
+    }
+  }
+  return NULL;
+}
+
+static GstBuffer *
+create_buffer (GstClockTime pts, GstClockTime dts, GstClockTime duration,
+    guint bytes)
+{
+  GstBuffer *buf;
+  guint8 *data;
+
+  data = g_malloc0 (bytes);
+  buf = gst_buffer_new_wrapped (data, bytes);
+  GST_BUFFER_PTS (buf) = pts;
+  GST_BUFFER_DTS (buf) = dts;
+  GST_BUFFER_DURATION (buf) = duration;
+  return buf;
+}
+
+static GstFlowReturn
+_test_sink_pad_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+{
+  struct TestInputData *test_data = g_object_get_qdata (G_OBJECT (pad),
+      g_quark_from_static_string ("test-mux-pad"));
+  GstBuffer *expected_buffer;
+
+  fail_unless (test_data->output_iter);
+  fail_unless (GST_IS_BUFFER (test_data->output_iter->data));
+  expected_buffer = test_data->output_iter->data;
+
+  fail_unless (GST_BUFFER_PTS (buffer) ==
+      (GST_BUFFER_PTS_IS_VALID (expected_buffer) ?
+          GST_BUFFER_PTS (expected_buffer) -
+          test_data->ts_offset : GST_BUFFER_PTS (expected_buffer)));
+  fail_unless (GST_BUFFER_DTS (buffer) ==
+      (GST_BUFFER_DTS_IS_VALID (expected_buffer) ?
+          GST_BUFFER_DTS (expected_buffer) -
+          test_data->ts_offset : GST_BUFFER_DTS (buffer)));
+  fail_unless (GST_BUFFER_DURATION (buffer) ==
+      GST_BUFFER_DURATION (expected_buffer));
+
+  test_data->output_iter = g_list_next (test_data->output_iter);
+
+  gst_buffer_unref (buffer);
+  return GST_FLOW_OK;
+}
+
+static void
+compare_event (GstEvent * event, GstEvent * expected)
+{
+  fail_unless (GST_EVENT_TYPE (event) == GST_EVENT_TYPE (expected));
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_CAPS:{
+      GstCaps *caps, *expected_caps;
+
+      gst_event_parse_caps (event, &caps);
+      gst_event_parse_caps (expected, &expected_caps);
+      fail_unless (gst_caps_can_intersect (caps, expected_caps));
+    }
+      break;
+    default:
+      break;
+  }
+}
+
+static gboolean
+_test_sink_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
+{
+  struct TestInputData *test_data = g_object_get_qdata (G_OBJECT (pad),
+      g_quark_from_static_string ("test-mux-pad"));
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_STREAM_START:
+    case GST_EVENT_SEGMENT:
+    case GST_EVENT_CAPS:
+    case GST_EVENT_EOS:
+      fail_unless (test_data->output_iter);
+      fail_unless (GST_IS_EVENT (test_data->output_iter->data));
+      compare_event (event, test_data->output_iter->data);
+      test_data->output_iter = g_list_next (test_data->output_iter);
+      break;
+    case GST_EVENT_TAG:
+      /* ignore this event */
+      break;
+    default:
+      GST_ERROR_OBJECT (pad, "Unexpected event: %" GST_PTR_FORMAT, event);
+      fail ("Unexpected event received %s", GST_EVENT_TYPE_NAME (event));
+      break;
+  }
+
+  gst_event_unref (event);
+  return TRUE;
+}
+
+static void
+_test_pad_added_cb (GstElement * element, GstPad * pad, gpointer udata)
+{
+  GstCaps *caps;
+  struct TestInputData **inputs = udata;
+  gint i = -1;
+  const gchar *name;
+  const gchar *strname;
+
+  caps = gst_pad_get_current_caps (pad);
+  strname = gst_structure_get_name (gst_caps_get_structure (caps, 0));
+  if (g_str_has_prefix (strname, "video/")) {
+    i = 0;                      /* video is 0, audio is 1 */
+    name = "videosink";
+  } else {
+    i = 1;
+    name = "audiosink";
+  }
+  gst_caps_unref (caps);
+
+  fail_unless (i != -1);
+  fail_unless (inputs[i]->sinkpad == NULL);
+  inputs[i]->sinkpad = gst_pad_new (name, GST_PAD_SINK);
+  inputs[i]->output_iter = inputs[i]->input;
+  g_object_set_qdata (G_OBJECT (inputs[i]->sinkpad),
+      g_quark_from_static_string ("test-mux-pad"), inputs[i]);
+  gst_pad_set_chain_function (inputs[i]->sinkpad, _test_sink_pad_chain);
+  gst_pad_set_event_function (inputs[i]->sinkpad, _test_sink_pad_event);
+  gst_pad_set_active (inputs[i]->sinkpad, TRUE);
+  fail_unless (gst_pad_link (pad, inputs[i]->sinkpad) == GST_PAD_LINK_OK);
+}
+
+static void
+check_output (const gchar * location, struct TestInputData *input1,
+    struct TestInputData *input2)
+{
+  GstElement *filesrc;
+  GstElement *demux;
+  struct TestInputData *inputs[2] = { input1, input2 };
+
+  filesrc = gst_element_factory_make ("filesrc", NULL);
+  demux = gst_element_factory_make ("qtdemux", NULL);
+
+  fail_unless (gst_element_link (filesrc, demux));
+
+  g_object_set (filesrc, "location", location, NULL);
+  g_signal_connect (demux, "pad-added", (GCallback) _test_pad_added_cb, inputs);
+
+  fail_unless (gst_element_set_state (demux,
+          GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
+  fail_unless (gst_element_set_state (filesrc,
+          GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
+
+  /* FIXME use a main loop */
+  g_usleep (2 * G_USEC_PER_SEC);
+
+  fail_unless (gst_element_set_state (demux,
+          GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS);
+  fail_unless (gst_element_set_state (filesrc,
+          GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS);
+  gst_object_unref (filesrc);
+  gst_object_unref (demux);
+}
+
+/* Muxes a file with qtmux using the inputs provided and
+ * then verifies that the generated file corresponds to the
+ * data in the inputs */
+static void
+run_muxing_test (struct TestInputData *input1, struct TestInputData *input2)
+{
+  gchar *location;
+  GstElement *qtmux;
+  GstElement *filesink;
+
+  location = g_strdup_printf ("%s/%s-%d", g_get_tmp_dir (), "qtmuxtest",
+      g_random_int ());
+  qtmux = gst_check_setup_element ("qtmux");
+  filesink = gst_element_factory_make ("filesink", NULL);
+  g_object_set (filesink, "location", location, NULL);
+  gst_element_link (qtmux, filesink);
+
+  input1->srcpad = setup_src_pad (qtmux, &srcvideorawtemplate, "video_%u");
+  fail_unless (input1->srcpad != NULL);
+  gst_pad_set_active (input1->srcpad, TRUE);
+
+  input2->srcpad = setup_src_pad (qtmux, &srcaudioaactemplate, "audio_%u");
+  fail_unless (input2->srcpad != NULL);
+  gst_pad_set_active (input2->srcpad, TRUE);
+
+  fail_unless (gst_element_set_state (filesink,
+          GST_STATE_PLAYING) != GST_STATE_CHANGE_FAILURE,
+      "could not set filesink to playing");
+  fail_unless (gst_element_set_state (qtmux,
+          GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+      "could not set to playing");
+
+  input1->thread =
+      g_thread_new ("test-push-data-1", test_input_push_data, input1);
+  input2->thread =
+      g_thread_new ("test-push-data-2", test_input_push_data, input2);
+
+  /* FIXME set a mainloop and wait for EOS */
+
+  g_thread_join (input1->thread);
+  g_thread_join (input2->thread);
+  input1->thread = NULL;
+  input2->thread = NULL;
+
+  gst_element_set_state (qtmux, GST_STATE_NULL);
+  gst_element_set_state (filesink, GST_STATE_NULL);
+
+  check_output (location, input1, input2);
+
+  gst_object_unref (filesink);
+  test_input_data_clean (input1);
+  test_input_data_clean (input2);
+  gst_check_teardown_element (qtmux);
+
+  /* delete file */
+  g_unlink (location);
+  g_free (location);
+}
+
+GST_START_TEST (test_muxing)
+{
+  struct TestInputData input1, input2;
+  GstCaps *caps;
+
+  test_input_data_init (&input1);
+  test_input_data_init (&input2);
+
+  /* Create the inputs, after calling the run below, all this data is
+   * transfered to it and we have no need to clean up */
+  input1.input = NULL;
+  input1.input =
+      g_list_append (input1.input, gst_event_new_stream_start ("test-1"));
+  caps = gst_caps_from_string
+      ("video/x-raw, width=(int)800, height=(int)600, "
+      "framerate=(fraction)1/1, format=(string)RGB");
+  input1.input = g_list_append (input1.input, gst_event_new_caps (caps));
+  gst_caps_unref (caps);
+  gst_segment_init (&input1.segment, GST_FORMAT_TIME);
+  input1.input =
+      g_list_append (input1.input, gst_event_new_segment (&input1.segment));
+  input1.input =
+      g_list_append (input1.input, create_buffer (0, GST_CLOCK_TIME_NONE,
+          GST_SECOND, 800 * 600 * 3));
+  input1.input =
+      g_list_append (input1.input, create_buffer (1 * GST_SECOND,
+          GST_CLOCK_TIME_NONE, GST_SECOND, 800 * 600 * 3));
+  input1.input =
+      g_list_append (input1.input, create_buffer (2 * GST_SECOND,
+          GST_CLOCK_TIME_NONE, GST_SECOND, 800 * 600 * 3));
+  input1.input = g_list_append (input1.input, gst_event_new_eos ());
+
+  input2.input = NULL;
+  input2.input =
+      g_list_append (input2.input, gst_event_new_stream_start ("test-2"));
+  caps = gst_caps_from_string
+      ("audio/mpeg, rate=(int)44100, channels=(int)1, mpegversion=(int)4, "
+      "stream-format=(string)raw, framed=(boolean)true");
+  input2.input = g_list_append (input2.input, gst_event_new_caps (caps));
+  gst_caps_unref (caps);
+  gst_segment_init (&input2.segment, GST_FORMAT_TIME);
+  input2.input =
+      g_list_append (input2.input, gst_event_new_segment (&input2.segment));
+  input2.input =
+      g_list_append (input2.input, create_buffer (0, 0, GST_SECOND, 4096));
+  input2.input =
+      g_list_append (input2.input, create_buffer (1 * GST_SECOND,
+          1 * GST_SECOND, GST_SECOND, 4096));
+  input2.input =
+      g_list_append (input2.input, create_buffer (2 * GST_SECOND,
+          2 * GST_SECOND, GST_SECOND, 4096));
+  input2.input = g_list_append (input2.input, gst_event_new_eos ());
+
+  run_muxing_test (&input1, &input2);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_muxing_non_zero_segment)
+{
+  struct TestInputData input1, input2;
+  GstCaps *caps;
+
+  test_input_data_init (&input1);
+  test_input_data_init (&input2);
+
+  /* Create the inputs, after calling the run below, all this data is
+   * transfered to it and we have no need to clean up */
+  input1.input = NULL;
+  input1.input =
+      g_list_append (input1.input, gst_event_new_stream_start ("test-1"));
+  caps = gst_caps_from_string
+      ("video/x-raw, width=(int)800, height=(int)600, "
+      "framerate=(fraction)1/1, format=(string)RGB");
+  input1.input = g_list_append (input1.input, gst_event_new_caps (caps));
+  gst_caps_unref (caps);
+  gst_segment_init (&input1.segment, GST_FORMAT_TIME);
+  input1.segment.start = 10 * GST_SECOND;
+  input1.input =
+      g_list_append (input1.input, gst_event_new_segment (&input1.segment));
+  input1.input =
+      g_list_append (input1.input, create_buffer (10 * GST_SECOND,
+          GST_CLOCK_TIME_NONE, GST_SECOND, 800 * 600 * 3));
+  input1.input =
+      g_list_append (input1.input, create_buffer (11 * GST_SECOND,
+          GST_CLOCK_TIME_NONE, GST_SECOND, 800 * 600 * 3));
+  input1.input =
+      g_list_append (input1.input, create_buffer (12 * GST_SECOND,
+          GST_CLOCK_TIME_NONE, GST_SECOND, 800 * 600 * 3));
+  input1.input = g_list_append (input1.input, gst_event_new_eos ());
+  input1.ts_offset = GST_SECOND * 10;
+
+  input2.input = NULL;
+  input2.input =
+      g_list_append (input2.input, gst_event_new_stream_start ("test-2"));
+  caps = gst_caps_from_string
+      ("audio/mpeg, rate=(int)44100, channels=(int)1, mpegversion=(int)4, "
+      "stream-format=(string)raw, framed=(boolean)true");
+  input2.input = g_list_append (input2.input, gst_event_new_caps (caps));
+  gst_caps_unref (caps);
+  gst_segment_init (&input2.segment, GST_FORMAT_TIME);
+  input2.segment.start = 10 * GST_SECOND;
+  input2.input =
+      g_list_append (input2.input, gst_event_new_segment (&input2.segment));
+  input2.input =
+      g_list_append (input2.input, create_buffer (10 * GST_SECOND,
+          10 * GST_SECOND, GST_SECOND, 4096));
+  input2.input =
+      g_list_append (input2.input, create_buffer (11 * GST_SECOND,
+          11 * GST_SECOND, GST_SECOND, 4096));
+  input2.input =
+      g_list_append (input2.input, create_buffer (12 * GST_SECOND,
+          12 * GST_SECOND, GST_SECOND, 4096));
+  input2.input = g_list_append (input2.input, gst_event_new_eos ());
+  input2.ts_offset = GST_SECOND * 10;
+
+  run_muxing_test (&input1, &input2);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_muxing_non_zero_segment_different)
+{
+  struct TestInputData input1, input2;
+  GstCaps *caps;
+
+  test_input_data_init (&input1);
+  test_input_data_init (&input2);
+
+  /* Create the inputs, after calling the run below, all this data is
+   * transfered to it and we have no need to clean up */
+  input1.input = NULL;
+  input1.input =
+      g_list_append (input1.input, gst_event_new_stream_start ("test-1"));
+  caps = gst_caps_from_string
+      ("video/x-raw, width=(int)800, height=(int)600, "
+      "framerate=(fraction)1/1, format=(string)RGB");
+  input1.input = g_list_append (input1.input, gst_event_new_caps (caps));
+  gst_caps_unref (caps);
+  gst_segment_init (&input1.segment, GST_FORMAT_TIME);
+  input1.segment.start = 5 * GST_SECOND;
+  input1.input =
+      g_list_append (input1.input, gst_event_new_segment (&input1.segment));
+  input1.input =
+      g_list_append (input1.input, create_buffer (5 * GST_SECOND,
+          GST_CLOCK_TIME_NONE, GST_SECOND, 800 * 600 * 3));
+  input1.input =
+      g_list_append (input1.input, create_buffer (6 * GST_SECOND,
+          GST_CLOCK_TIME_NONE, GST_SECOND, 800 * 600 * 3));
+  input1.input =
+      g_list_append (input1.input, create_buffer (7 * GST_SECOND,
+          GST_CLOCK_TIME_NONE, GST_SECOND, 800 * 600 * 3));
+  input1.input = g_list_append (input1.input, gst_event_new_eos ());
+  input1.ts_offset = GST_SECOND * 5;
+
+  input2.input = NULL;
+  input2.input =
+      g_list_append (input2.input, gst_event_new_stream_start ("test-2"));
+  caps = gst_caps_from_string
+      ("audio/mpeg, rate=(int)44100, channels=(int)1, mpegversion=(int)4, "
+      "stream-format=(string)raw, framed=(boolean)true");
+  input2.input = g_list_append (input2.input, gst_event_new_caps (caps));
+  gst_caps_unref (caps);
+  gst_segment_init (&input2.segment, GST_FORMAT_TIME);
+  input2.segment.start = 10 * GST_SECOND;
+  input2.input =
+      g_list_append (input2.input, gst_event_new_segment (&input2.segment));
+  input2.input =
+      g_list_append (input2.input, create_buffer (10 * GST_SECOND,
+          10 * GST_SECOND, GST_SECOND, 4096));
+  input2.input =
+      g_list_append (input2.input, create_buffer (11 * GST_SECOND,
+          11 * GST_SECOND, GST_SECOND, 4096));
+  input2.input =
+      g_list_append (input2.input, create_buffer (12 * GST_SECOND,
+          12 * GST_SECOND, GST_SECOND, 4096));
+  input2.input = g_list_append (input2.input, gst_event_new_eos ());
+  input2.ts_offset = GST_SECOND * 10;
+
+  run_muxing_test (&input1, &input2);
+}
+
+GST_END_TEST;
 
 static Suite *
 qtmux_suite (void)
@@ -926,6 +1417,10 @@ qtmux_suite (void)
   tcase_add_test (tc_chain, test_encodebin_qtmux);
   tcase_add_test (tc_chain, test_encodebin_mp4mux);
 
+  tcase_add_test (tc_chain, test_muxing);
+  tcase_add_test (tc_chain, test_muxing_non_zero_segment);
+  tcase_add_test (tc_chain, test_muxing_non_zero_segment_different);
+
   return s;
 }
 
diff --git a/tests/check/elements/rtp-payloading.c b/tests/check/elements/rtp-payloading.c
index a5db021dba3eddbf061279cb43c7e88731e382dd..7dc9ce07cbd13322a9d3d5f0a170adc83e347b4b 100644
--- a/tests/check/elements/rtp-payloading.c
+++ b/tests/check/elements/rtp-payloading.c
@@ -476,7 +476,12 @@ static int rtp_h263_frame_count = 1;
 GST_START_TEST (rtp_h263)
 {
   rtp_pipeline_test (rtp_h263_frame_data, rtp_h263_frame_data_size,
-      rtp_h263_frame_count, "video/x-h263,variant=(string)itu,h263version=h263",
+      rtp_h263_frame_count,
+      "video/x-h263,variant=(string)itu,h263version=h263",
+      "rtph263pay", "rtph263depay", 0, 0, FALSE);
+  rtp_pipeline_test (rtp_h263_frame_data, rtp_h263_frame_data_size,
+      rtp_h263_frame_count,
+      "video/x-h263,variant=(string)itu,h263version=h263,width=10,height=20",
       "rtph263pay", "rtph263depay", 0, 0, FALSE);
 }
 
diff --git a/tests/check/elements/rtpjitterbuffer.c b/tests/check/elements/rtpjitterbuffer.c
index 3f711313829512b90869f4fe8544fc1d93bee684..cc1cd020cb7a5e02f97041e0f94cea68dd5aa328 100644
--- a/tests/check/elements/rtpjitterbuffer.c
+++ b/tests/check/elements/rtpjitterbuffer.c
@@ -1019,12 +1019,13 @@ GST_START_TEST (test_rtx_expected_next)
   gst_clock_id_unref (id);
 
   /* put second buffer, the jitterbuffer should now know that the packet spacing
-   * is 20ms and should ask for retransmission of seqnum 2 in 20ms */
+   * is 20ms and should ask for retransmission of seqnum 2 in 20ms+10ms because
+   * 2*jitter==0 and 0.5*packet_spacing==10ms */
   in_buf = generate_test_buffer (20 * GST_MSECOND, TRUE, 1, 160);
   g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK);
 
   gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id);
-  gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 60 * GST_MSECOND);
+  gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 50 * GST_MSECOND);
   tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock));
   g_assert (tid == id);
   gst_clock_id_unref (tid);
@@ -1032,11 +1033,12 @@ GST_START_TEST (test_rtx_expected_next)
 
   out_event = g_async_queue_pop (data.src_event_queue);
   g_assert (out_event != NULL);
-  verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 20, 20 * GST_MSECOND);
+  verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 10, 20 * GST_MSECOND);
 
-  /* now we wait for the next timeout */
+  /* now we wait for the next timeout, all following timeouts 40ms in the
+   * future because this is rtx-retry-timeout */
   gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id);
-  gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 100 * GST_MSECOND);
+  gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 90 * GST_MSECOND);
   tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock));
   g_assert (id == tid);
   gst_clock_id_unref (tid);
@@ -1044,10 +1046,10 @@ GST_START_TEST (test_rtx_expected_next)
 
   out_event = g_async_queue_pop (data.src_event_queue);
   g_assert (out_event != NULL);
-  verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 60, 20 * GST_MSECOND);
+  verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 50, 20 * GST_MSECOND);
 
   gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id);
-  gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 140 * GST_MSECOND);
+  gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 130 * GST_MSECOND);
   tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock));
   g_assert (id == tid);
   gst_clock_id_unref (tid);
@@ -1055,7 +1057,7 @@ GST_START_TEST (test_rtx_expected_next)
 
   out_event = g_async_queue_pop (data.src_event_queue);
   g_assert (out_event != NULL);
-  verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 100, 20 * GST_MSECOND);
+  verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 90, 20 * GST_MSECOND);
 
   gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id);
   gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 200 * GST_MSECOND);
@@ -1070,7 +1072,7 @@ GST_START_TEST (test_rtx_expected_next)
 
 
   gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id);
-  gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 260 * GST_MSECOND);
+  gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 240 * GST_MSECOND);
   tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock));
   g_assert (tid == id);
   gst_clock_id_unref (tid);
@@ -1112,7 +1114,8 @@ GST_START_TEST (test_rtx_two_missing)
   gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 20 * GST_MSECOND);
 
   /* put second buffer, the jitterbuffer should now know that the packet spacing
-   * is 20ms and should ask for retransmission of seqnum 2 at 60ms */
+   * is 20ms and should ask for retransmission of seqnum 2 in 20ms+10ms because
+   * 2*jitter==0 and 0.5*packet_spacing==10ms */
   in_buf = generate_test_buffer (20 * GST_MSECOND, TRUE, 1, 160);
   g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK);
 
@@ -1122,34 +1125,53 @@ GST_START_TEST (test_rtx_two_missing)
   g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK);
 
   /* wait for first retransmission request */
-  gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 60 * GST_MSECOND);
-  do {
-    gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id);
-    tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock));
-    gst_clock_id_unref (id);
-    gst_clock_id_unref (tid);
-  } while (id != tid);
+  gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 50 * GST_MSECOND);
+  gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id);
+  tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock));
+  g_assert (id == tid);
+  gst_clock_id_unref (id);
+  gst_clock_id_unref (tid);
 
-  /* we should have 2 events now, one for 2 and another for 3 */
+  /* First event for 2 */
   out_event = g_async_queue_pop (data.src_event_queue);
   g_assert (out_event != NULL);
-  verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 20, 20 * GST_MSECOND);
+  verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 10, 20 * GST_MSECOND);
+
+  /* wait for second retransmission request */
+  gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 60 * GST_MSECOND);
+  gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id);
+  tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock));
+  g_assert (id == tid);
+  gst_clock_id_unref (id);
+  gst_clock_id_unref (tid);
+
+  /* Second event for 3 */
   out_event = g_async_queue_pop (data.src_event_queue);
   g_assert (out_event != NULL);
   verify_rtx_event (out_event, 3, 60 * GST_MSECOND, 0, 20 * GST_MSECOND);
 
-  /* now we wait for the next timeout */
+  /* now we wait for the next timeout for 2 */
   gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id);
-  gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 100 * GST_MSECOND);
+  gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 90 * GST_MSECOND);
   tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock));
   g_assert (id == tid);
   gst_clock_id_unref (id);
   gst_clock_id_unref (tid);
 
-  /* we should have 2 events now, one for 2 and another for 3 */
+  /* First event for 2 */
   out_event = g_async_queue_pop (data.src_event_queue);
   g_assert (out_event != NULL);
-  verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 60, 20 * GST_MSECOND);
+  verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 50, 20 * GST_MSECOND);
+
+  /* now we wait for the next timeout for 3 */
+  gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id);
+  gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 100 * GST_MSECOND);
+  tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock));
+  g_assert (id == tid);
+  gst_clock_id_unref (id);
+  gst_clock_id_unref (tid);
+
+  /* Second event for 3 */
   out_event = g_async_queue_pop (data.src_event_queue);
   g_assert (out_event != NULL);
   verify_rtx_event (out_event, 3, 60 * GST_MSECOND, 40, 20 * GST_MSECOND);
@@ -1165,7 +1187,7 @@ GST_START_TEST (test_rtx_two_missing)
   }
 
   gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id);
-  gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 140 * GST_MSECOND);
+  gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 130 * GST_MSECOND);
   tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock));
   g_assert (id == tid);
   gst_clock_id_unref (id);
@@ -1174,7 +1196,7 @@ GST_START_TEST (test_rtx_two_missing)
   /* now we only get requests for 2 */
   out_event = g_async_queue_pop (data.src_event_queue);
   g_assert (out_event != NULL);
-  verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 100, 20 * GST_MSECOND);
+  verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 90, 20 * GST_MSECOND);
 
   /* this is when buffer 0 deadline expires */
   gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id);
@@ -1260,7 +1282,8 @@ GST_START_TEST (test_rtx_packet_delay)
   gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), 20 * GST_MSECOND);
 
   /* put second buffer, the jitterbuffer should now know that the packet spacing
-   * is 20ms and should ask for retransmission of seqnum 2 at 60ms */
+   * is 20ms and should ask for retransmission of seqnum 2 in 20ms+10ms because
+   * 2*jitter==0 and 0.5*packet_spacing==10ms */
   in_buf = generate_test_buffer (20 * GST_MSECOND, TRUE, 1, 160);
   g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK);
 
@@ -1275,7 +1298,7 @@ GST_START_TEST (test_rtx_packet_delay)
   /* we should now receive retransmission requests for 2 -> 5 */
   out_event = g_async_queue_pop (data.src_event_queue);
   g_assert (out_event != NULL);
-  verify_rtx_event (out_event, 2, 20 * GST_MSECOND, 40, 20 * GST_MSECOND);
+  verify_rtx_event (out_event, 2, 20 * GST_MSECOND, 30, 20 * GST_MSECOND);
 
   for (i = 3; i < 5; i++) {
     GST_DEBUG ("popping %d", i);
diff --git a/tests/check/elements/rtprtx.c b/tests/check/elements/rtprtx.c
index 706f2910b70e309639481a28bba9adbb0a99aa9d..841f42692e65755626c1f62e452680c8c4adedb2 100644
--- a/tests/check/elements/rtprtx.c
+++ b/tests/check/elements/rtprtx.c
@@ -303,12 +303,63 @@ typedef struct
   guint seqnum_prev;
 } RTXReceiveData;
 
+static GstPadProbeReturn
+do_buffer_list_as_buffers_probe (GstPad * pad, GstPadProbeInfo * info,
+    gpointer user_data, GstPadProbeCallback callback)
+{
+  /* Iterate the buffer list, removing any items that we're
+   * told to drop and creating a new bufferlist. If all buffers
+   * are dropped, return DROP.
+   */
+  guint i, len;
+  GstBufferList *list;
+  GstBufferList *outlist;
+  GstPadProbeInfo buf_info = *info;
+
+  GST_INFO_OBJECT (pad, "probing each buffer in list individually");
+
+  list = gst_pad_probe_info_get_buffer_list (info);
+
+  g_return_val_if_fail (list != NULL, GST_PAD_PROBE_REMOVE);
+
+  len = gst_buffer_list_length (list);
+  outlist = gst_buffer_list_new_sized (len);
+
+  buf_info.type = GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_PUSH;
+  for (i = 0; i < len; i++) {
+    GstBuffer *buffer = gst_buffer_list_get (list, i);
+    GstPadProbeReturn ret;
+    buf_info.data = buffer;
+    ret = callback (pad, &buf_info, user_data);
+    /* If the buffer wasn't dropped, add it to the output list */
+    if (ret != GST_PAD_PROBE_DROP)
+      gst_buffer_list_insert (outlist, -1, gst_buffer_ref (buffer));
+  }
+
+  len = gst_buffer_list_length (outlist);
+  if (len == 0) {
+    /* Everything was discarded, drop our outlist */
+    gst_buffer_list_unref (outlist);
+    return GST_PAD_PROBE_DROP;
+  }
+
+  /* Replace the original buffer list with the modified one */
+  gst_buffer_list_unref (list);
+  info->data = outlist;
+  return GST_PAD_PROBE_OK;
+}
+
 static GstPadProbeReturn
 rtprtxsend_srcpad_probe (GstPad * pad, GstPadProbeInfo * info,
     gpointer user_data)
 {
   GstPadProbeReturn ret = GST_PAD_PROBE_OK;
 
+  GST_LOG_OBJECT (pad, "here");
+  if (info->type == (GST_PAD_PROBE_TYPE_BUFFER_LIST | GST_PAD_PROBE_TYPE_PUSH))
+    return do_buffer_list_as_buffers_probe (pad, info, user_data,
+        rtprtxsend_srcpad_probe);
+
   if (info->type == (GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_PUSH)) {
     GstBuffer *buffer = GST_BUFFER (info->data);
     RTXSendData *rtxdata = (RTXSendData *) user_data;
@@ -531,7 +582,8 @@ GST_START_TEST (test_drop_one_sender)
 
   srcpad = gst_element_get_static_pad (rtprtxsend, "src");
   gst_pad_add_probe (srcpad,
-      (GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_PUSH),
+      (GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_BUFFER_LIST |
+          GST_PAD_PROBE_TYPE_PUSH),
       (GstPadProbeCallback) rtprtxsend_srcpad_probe, &send_rtxdata, NULL);
   sinkpad = gst_pad_get_peer (srcpad);
   fail_if (sinkpad == NULL);
diff --git a/tests/check/elements/wavpackparse.c b/tests/check/elements/wavpackparse.c
index ec409097f18667ac3452cd9e846f0d870860353d..f123afb30d826f35cdf55c2d3ae92186c094e6bf 100644
--- a/tests/check/elements/wavpackparse.c
+++ b/tests/check/elements/wavpackparse.c
@@ -116,6 +116,9 @@ GST_START_TEST (test_parsing_valid_frames)
   /* should decode the buffer without problems */
   fail_unless_equals_int (gst_pad_push (mysrcpad, inbuffer), GST_FLOW_OK);
 
+  /* inform of no further data */
+  fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+
   num_buffers = g_list_length (buffers);
   /* should get 2 buffers, each one complete wavpack frame */
   fail_unless_equals_int (num_buffers, 2);
@@ -177,6 +180,9 @@ GST_START_TEST (test_parsing_invalid_first_header)
   /* should decode the buffer without problems */
   fail_unless_equals_int (gst_pad_push (mysrcpad, inbuffer), GST_FLOW_OK);
 
+  /* inform of no further data */
+  fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+
   num_buffers = g_list_length (buffers);
 
   /* should get 1 buffers, the second non-broken one */
diff --git a/tests/check/gst-plugins-good.supp b/tests/check/gst-plugins-good.supp
index 3e987e60c3521d1a4e3e79f90aa0c886d67be89a..e86794df452c9c037fe9c0d11c0b3efa9805a5d1 100644
--- a/tests/check/gst-plugins-good.supp
+++ b/tests/check/gst-plugins-good.supp
@@ -125,3 +125,21 @@
    fun:jinit_compress_master
    fun:jpeg_start_compress
 }
+
+{
+   <well known zlib bug>
+   Memcheck:Cond
+   fun:inflateReset2
+   fun:inflateInit2_
+   fun:png_create_read_struct_2
+   fun:png_create_read_struct
+}
+
+{
+   <apparent strtod bug when trying to parse "infinity" from "interleaved">
+   Memcheck:Addr8
+   fun:__GI___strncasecmp_l
+   fun:____strtod_l_internal
+   fun:gst_value_deserialize_double
+}
+
diff --git a/tests/check/pipelines/wavenc.c b/tests/check/pipelines/wavenc.c
index b79fbf6ff3706f7f2a271f41b6294ff211b8750f..ee30c18638ec0e5face2c8835e6f09de7fa8148f 100644
--- a/tests/check/pipelines/wavenc.c
+++ b/tests/check/pipelines/wavenc.c
@@ -58,7 +58,7 @@ bus_handler (GstBus * bus, GstMessage * message, gpointer data)
 }
 
 /*
- * gst-launch \
+ * gst-launch-1.0 \
  * audiotestsrc freq=440 num-buffers=100 ! interleave name=i ! audioconvert ! wavenc ! filesink location=/tmp/mc.wav \
  * audiotestsrc freq=880 num-buffers=100 ! i.
  * ...
diff --git a/tests/examples/equalizer/demo.c b/tests/examples/equalizer/demo.c
index bfa4870851f319a3ddc9a90c42a8a426df50a976..387544de7b51152b889d48e1ee781b8e45b90733 100644
--- a/tests/examples/equalizer/demo.c
+++ b/tests/examples/equalizer/demo.c
@@ -1,3 +1,22 @@
+/* GStreamer
+ * Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
@@ -100,6 +119,15 @@ draw_spectrum (gfloat * data)
   gdk_window_end_paint (gtk_widget_get_window (drawingarea));
 }
 
+static void
+dynamic_link (GstPadTemplate * templ, GstPad * newpad, gpointer user_data)
+{
+  GstPad *target = GST_PAD (user_data);
+
+  gst_pad_link (newpad, target);
+  gst_object_unref (target);
+}
+
 /* receive spectral data from element message */
 static gboolean
 message_handler (GstBus * bus, GstMessage * message, gpointer data)
@@ -130,22 +158,48 @@ int
 main (int argc, char *argv[])
 {
   GstElement *bin;
-  GstElement *src, *capsfilter, *equalizer, *spectrum, *audioconvert, *sink;
+  GstElement *decodebin, *decconvert;
+  GstElement *capsfilter, *equalizer, *spectrum, *sinkconvert, *sink;
   GstCaps *caps;
   GstBus *bus;
-  GtkWidget *appwindow, *vbox, *hbox, *widget;
-  int i;
+  GtkWidget *appwindow, *vbox, *hbox, *scale;
+  int i, num_bands = NBANDS;
+
+  GOptionEntry options[] = {
+    {"bands", 'b', 0, G_OPTION_ARG_INT, &num_bands,
+        "Number of bands", NULL},
+    {NULL}
+  };
+  GOptionContext *ctx;
+  GError *err = NULL;
+
+  ctx = g_option_context_new ("- demo of audio equalizer");
+  g_option_context_add_main_entries (ctx, options, NULL);
+  g_option_context_add_group (ctx, gst_init_get_option_group ());
+  g_option_context_add_group (ctx, gtk_get_option_group (TRUE));
+
+  if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+    g_print ("Error initializing: %s\n", err->message);
+    exit (1);
+  }
+
+  if (argc < 2) {
+    g_print ("Usage: %s <uri to play>\n", argv[0]);
+    g_print ("    For optional arguments: --help\n");
+    exit (-1);
+  }
 
   gst_init (&argc, &argv);
   gtk_init (&argc, &argv);
 
   bin = gst_pipeline_new ("bin");
 
-  /* White noise */
-  src = gst_element_factory_make ("audiotestsrc", "src");
-  g_object_set (G_OBJECT (src), "wave", 5, "volume", 0.8, NULL);
+  /* Uri decoding */
+  decodebin = gst_element_factory_make ("uridecodebin", "decoder");
+  g_object_set (G_OBJECT (decodebin), "uri", argv[1], NULL);
 
   /* Force float32 samples */
+  decconvert = gst_element_factory_make ("audioconvert", "decconvert");
   capsfilter = gst_element_factory_make ("capsfilter", "capsfilter");
   caps =
       gst_caps_new_simple ("audio/x-raw", "format", G_TYPE_STRING, "F32LE",
@@ -153,29 +207,35 @@ main (int argc, char *argv[])
   g_object_set (capsfilter, "caps", caps, NULL);
 
   equalizer = gst_element_factory_make ("equalizer-nbands", "equalizer");
-  g_object_set (G_OBJECT (equalizer), "num-bands", NBANDS, NULL);
+  g_object_set (G_OBJECT (equalizer), "num-bands", num_bands, NULL);
 
   spectrum = gst_element_factory_make ("spectrum", "spectrum");
   g_object_set (G_OBJECT (spectrum), "bands", spect_bands, "threshold", -80,
       "post-messages", TRUE, "interval", 500 * GST_MSECOND, NULL);
 
-  audioconvert = gst_element_factory_make ("audioconvert", "audioconvert");
+  sinkconvert = gst_element_factory_make ("audioconvert", "sinkconvert");
 
   sink = gst_element_factory_make ("autoaudiosink", "sink");
 
-  gst_bin_add_many (GST_BIN (bin), src, capsfilter, equalizer, spectrum,
-      audioconvert, sink, NULL);
-  if (!gst_element_link_many (src, capsfilter, equalizer, spectrum,
-          audioconvert, sink, NULL)) {
+  gst_bin_add_many (GST_BIN (bin), decodebin, decconvert, capsfilter, equalizer,
+      spectrum, sinkconvert, sink, NULL);
+  if (!gst_element_link_many (decconvert, capsfilter, equalizer, spectrum,
+          sinkconvert, sink, NULL)) {
     fprintf (stderr, "can't link elements\n");
     exit (1);
   }
 
+  /* Handle dynamic pads */
+  g_signal_connect (G_OBJECT (decodebin), "pad-added",
+      G_CALLBACK (dynamic_link), gst_element_get_static_pad (decconvert,
+          "sink"));
+
   bus = gst_element_get_bus (bin);
   gst_bus_add_watch (bus, message_handler, NULL);
   gst_object_unref (bus);
 
   appwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_window_set_title (GTK_WINDOW (appwindow), "Equalizer Demo");
   g_signal_connect (G_OBJECT (appwindow), "destroy",
       G_CALLBACK (on_window_destroy), NULL);
   vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
@@ -188,7 +248,7 @@ main (int argc, char *argv[])
 
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 20);
 
-  for (i = 0; i < NBANDS; i++) {
+  for (i = 0; i < num_bands; i++) {
     GObject *band;
     gdouble freq;
     gdouble bw;
@@ -208,35 +268,38 @@ main (int argc, char *argv[])
 
     scales_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
 
-    widget = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL,
+    /* Create gain scale */
+    scale = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL,
         -24.0, 12.0, 0.5);
-    gtk_scale_set_draw_value (GTK_SCALE (widget), TRUE);
-    gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP);
-    gtk_range_set_value (GTK_RANGE (widget), gain);
-    gtk_widget_set_size_request (widget, 25, 150);
-    g_signal_connect (G_OBJECT (widget), "value-changed",
+    gtk_scale_set_draw_value (GTK_SCALE (scale), TRUE);
+    gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
+    gtk_range_set_value (GTK_RANGE (scale), gain);
+    gtk_widget_set_size_request (scale, 35, 150);
+    g_signal_connect (G_OBJECT (scale), "value-changed",
         G_CALLBACK (on_gain_changed), (gpointer) band);
-    gtk_box_pack_start (GTK_BOX (scales_hbox), widget, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (scales_hbox), scale, FALSE, FALSE, 0);
 
-    widget = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL,
+    /* Create bandwidth scale */
+    scale = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL,
         0.0, 20000.0, 5.0);
-    gtk_scale_set_draw_value (GTK_SCALE (widget), TRUE);
-    gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP);
-    gtk_range_set_value (GTK_RANGE (widget), bw);
-    gtk_widget_set_size_request (widget, 25, 150);
-    g_signal_connect (G_OBJECT (widget), "value-changed",
+    gtk_scale_set_draw_value (GTK_SCALE (scale), TRUE);
+    gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
+    gtk_range_set_value (GTK_RANGE (scale), bw);
+    gtk_widget_set_size_request (scale, 45, 150);
+    g_signal_connect (G_OBJECT (scale), "value-changed",
         G_CALLBACK (on_bandwidth_changed), (gpointer) band);
-    gtk_box_pack_start (GTK_BOX (scales_hbox), widget, TRUE, TRUE, 0);
+    gtk_box_pack_start (GTK_BOX (scales_hbox), scale, TRUE, TRUE, 0);
 
-    widget = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL,
+    /* Create frequency scale */
+    scale = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL,
         20.0, 20000.0, 5.0);
-    gtk_scale_set_draw_value (GTK_SCALE (widget), TRUE);
-    gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP);
-    gtk_range_set_value (GTK_RANGE (widget), freq);
-    gtk_widget_set_size_request (widget, 25, 150);
-    g_signal_connect (G_OBJECT (widget), "value-changed",
+    gtk_scale_set_draw_value (GTK_SCALE (scale), TRUE);
+    gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
+    gtk_range_set_value (GTK_RANGE (scale), freq);
+    gtk_widget_set_size_request (scale, 45, 150);
+    g_signal_connect (G_OBJECT (scale), "value-changed",
         G_CALLBACK (on_freq_changed), (gpointer) band);
-    gtk_box_pack_start (GTK_BOX (scales_hbox), widget, TRUE, TRUE, 0);
+    gtk_box_pack_start (GTK_BOX (scales_hbox), scale, TRUE, TRUE, 0);
 
     gtk_container_add (GTK_CONTAINER (frame), scales_hbox);
 
diff --git a/tests/examples/rtp/client-PCMA.c b/tests/examples/rtp/client-PCMA.c
index ee8366f53921c7aee20f4da15b20c1daeb3896cc..664b33664cb9fccf683a38edfe4b3b237c323d01 100644
--- a/tests/examples/rtp/client-PCMA.c
+++ b/tests/examples/rtp/client-PCMA.c
@@ -116,9 +116,9 @@ pad_added_cb (GstElement * rtpbin, GstPad * new_pad, GstElement * depay)
 
 /* build a pipeline equivalent to:
  *
- * gst-launch -v rtpbin name=rtpbin                                                \
+ * gst-launch-1.0 -v rtpbin name=rtpbin                                                \
  *      udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_0              \
- *        rtpbin. ! rtppcmadepay ! alawdec ! audioconvert ! audioresample ! alsasink \
+ *        rtpbin. ! rtppcmadepay ! alawdec ! audioconvert ! audioresample ! autoaudiosink \
  *      udpsrc port=5003 ! rtpbin.recv_rtcp_sink_0                              \
  *        rtpbin.send_rtcp_src_0 ! udpsink port=5007 host=$DEST sync=false async=false
  */
diff --git a/tests/examples/rtp/server-alsasrc-PCMA.c b/tests/examples/rtp/server-alsasrc-PCMA.c
index 4690eed45c045959745beab547dc38fbe82666a7..af8f7de5ad59249cffc05a5572785f905165f1ff 100644
--- a/tests/examples/rtp/server-alsasrc-PCMA.c
+++ b/tests/examples/rtp/server-alsasrc-PCMA.c
@@ -108,7 +108,7 @@ print_stats (GstElement * rtpbin)
 
 /* build a pipeline equivalent to:
  *
- * gst-launch -v rtpbin name=rtpbin \
+ * gst-launch-1.0 -v rtpbin name=rtpbin \
  *    $AUDIO_SRC ! audioconvert ! audioresample ! $AUDIO_ENC ! $AUDIO_PAY ! rtpbin.send_rtp_sink_0  \
  *           rtpbin.send_rtp_src_0 ! udpsink port=5002 host=$DEST                      \
  *           rtpbin.send_rtcp_src_0 ! udpsink port=5003 host=$DEST sync=false async=false \
diff --git a/tests/icles/test-segment-seeks.c b/tests/icles/test-segment-seeks.c
index ebd5db42d02b3bffc5016841188a2a6438c96353..4c9b6708e9bb9a7600800511b0428571b9271f05 100644
--- a/tests/icles/test-segment-seeks.c
+++ b/tests/icles/test-segment-seeks.c
@@ -37,6 +37,7 @@ main (int argc, char **argv)
   GstMessage *msg;
   gchar *uri;
   gint64 dur, start, stop;
+  gboolean prerolled = FALSE;
 
   if (argc < 2) {
     g_printerr ("Usage: %s FILENAME\n", argv[0]);
@@ -74,6 +75,7 @@ main (int argc, char **argv)
       GST_CLOCK_TIME_NONE, GST_MESSAGE_ASYNC_DONE | GST_MESSAGE_ERROR);
 
   g_assert (GST_MESSAGE_TYPE (msg) != GST_MESSAGE_ERROR);
+  prerolled = TRUE;
 
   gst_message_unref (msg);
 
@@ -86,11 +88,14 @@ main (int argc, char **argv)
   do {
     GstSeekFlags seek_flags;
     gboolean ret;
+    gboolean segment_done = FALSE;
 
     seek_flags = GST_SEEK_FLAG_ACCURATE | GST_SEEK_FLAG_SEGMENT;
 
-    if (start == 0)
+    if (start == 0) {
+      prerolled = FALSE;
       seek_flags |= GST_SEEK_FLAG_FLUSH;
+    }
 
     stop = start + SEGMENT_DURATION;
 
@@ -102,24 +107,34 @@ main (int argc, char **argv)
 
     g_assert (ret);
 
-    if (start == 0) {
-      /* wait for preroll again */
-      msg = gst_bus_timed_pop_filtered (GST_ELEMENT_BUS (playbin),
-          GST_CLOCK_TIME_NONE, GST_MESSAGE_ASYNC_DONE | GST_MESSAGE_ERROR);
-
-      g_assert (GST_MESSAGE_TYPE (msg) != GST_MESSAGE_ERROR);
-      gst_message_unref (msg);
+    if (!prerolled) {
+      while (!prerolled) {
+        /* wait for preroll again */
+        msg = gst_bus_timed_pop_filtered (GST_ELEMENT_BUS (playbin),
+            GST_CLOCK_TIME_NONE, GST_MESSAGE_SEGMENT_DONE |
+            GST_MESSAGE_ASYNC_DONE | GST_MESSAGE_ERROR);
+
+        g_assert (GST_MESSAGE_TYPE (msg) != GST_MESSAGE_ERROR);
+        if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_SEGMENT_DONE) {
+          segment_done = TRUE;
+        } else {
+          prerolled = TRUE;
+        }
+        gst_message_unref (msg);
+      }
 
       gst_element_set_state (playbin, GST_STATE_PLAYING);
     }
 
-    /* wait for end of segment */
-    msg = gst_bus_timed_pop_filtered (GST_ELEMENT_BUS (playbin),
-        GST_CLOCK_TIME_NONE, GST_MESSAGE_SEGMENT_DONE | GST_MESSAGE_ERROR);
+    /* wait for end of segment if we didn't get it above already */
+    if (!segment_done) {
+      msg = gst_bus_timed_pop_filtered (GST_ELEMENT_BUS (playbin),
+          GST_CLOCK_TIME_NONE, GST_MESSAGE_SEGMENT_DONE | GST_MESSAGE_ERROR);
 
-    g_assert (GST_MESSAGE_TYPE (msg) != GST_MESSAGE_ERROR);
+      g_assert (GST_MESSAGE_TYPE (msg) != GST_MESSAGE_ERROR);
 
-    gst_message_unref (msg);
+      gst_message_unref (msg);
+    }
 
     start = stop;
   }