audioaggregator: fix input_buffer ownership

The way pad->priv->input_buffer reference was managed was pretty
spurious:
- it was overridden without unrefing it, which could potentially lead to
  leaks.
- we were unreffing it while keeping the pointer around, which could
  potentially lead to use-after-free or double-free.

As priv->input_buffer is actually no longer used outside of the
aggregate() method, remove it from pad->priv to simplify the code and
prevent the issues desribed above.

Fix a single buffer leak when shutting down the pipeline as the buffer
returned from gst_aggregator_pad_drop_buffer() was never unreffed.

Part-of: <gstreamer/gst-plugins-base!1062>
35 jobs for !1062 with backport-mr-1061-into-1.18-audioaggregator in 40 minutes and 33 seconds (queued for 3 seconds)
detached
Status Job ID Name Coverage
  Build Docker
passed #7876887
alpine amd64 manifest builder docker

00:00:36

passed #7876886
android docker

00:00:22

passed #7876885
cerbero fedora amd64 docker

00:00:22

passed #7876884
fedora amd64 docker

00:00:22

passed #7876888
gst-indent amd64 docker

00:00:48

 
  Preparation
passed #7876890
gst indent

00:00:45

passed #7876889
manifest

00:00:34

 
  Build
passed #7876899
gstreamer
build cerbero cross-android universal

00:06:47

passed #7876903
gst-ios-14.3
build cerbero cross-ios universal

00:24:12

passed #7876900
gstreamer
build cerbero cross win32

00:04:07

passed #7876901
gstreamer
build cerbero cross win64

00:04:21

passed #7876898
gstreamer
build cerbero fedora x86_64

00:03:52

passed #7876902
gst-macos-11.1
build cerbero macos x86_64

00:15:33

passed #7876894
build clang fedora x86_64

00:08:16

manual #7876897
docker windows 1809 allowed to fail manual
build msys2
passed #7876891
build nodebug fedora x86_64

00:07:34

passed #7876892
build static fedora x86_64

00:07:00

passed #7876893
build static nodebug fedora x86_64

00:05:59

passed #7876895
docker windows 1809
build vs2017 amd64

00:08:29

passed #7876896
docker windows 1809
build vs2017 x86

00:08:45

 
  Test
passed #7876904
gstreamer
check fedora

00:05:14

passed #7876905
gstreamer
integration testsuites fedora 1/4

00:13:51

passed #7876906
gstreamer
integration testsuites fedora 2/4

00:15:01

passed #7876907
gstreamer
integration testsuites fedora 3/4

00:16:54

passed #7876908
gstreamer
integration testsuites fedora 4/4

00:18:50

passed #7878753
gstreamer
valgrind bad

00:05:50

passed #7876909
gstreamer
valgrind base

00:06:53

passed #7876913
gstreamer
valgrind ges

00:09:48

passed #7878754
gstreamer
valgrind good

00:08:20

passed #7876911
gstreamer
valgrind ugly

00:04:11

failed #7876912
gstreamer
valgrind bad

00:04:34

failed #7876910
gstreamer
valgrind good

00:09:30

 
  Integrate
passed #7876914
cross-android universal examples

00:06:26

passed #7876916
gst-ios-14.3
cross-ios universal examples

00:04:26

passed #7876915
documentation

00:11:12