qtmux: Fix memory leak while pushing fragmented data

The memory leak occurs in the case when the buffer has been
added to the fragment_buffers array of the current pad and
never been sent because of the push failure of the previous
buffers: moof or mdat header or fragmented buffer(s).
Status Job ID Name Coverage
  Preparation
failed #584009
gst indent

00:00:39

passed #584008
manifest

00:00:59

 
  Build
passed #584019
build cerbero android universal

00:13:01

passed #584020
build cerbero cross win32

00:11:13

passed #584021
build cerbero cross win64

00:06:55

passed #584018
build cerbero fedora x86_64

00:08:10

manual #584023
gst-ios-12.2 allowed to fail manual
build cerbero ios universal
failed #584022
gst-macos-10.14
build cerbero macos x86_64

00:04:51

passed #584014
build clang fedora x86_64

00:08:54

passed #584010
build fedora x86_64

00:07:02

passed #584017
docker windows 1607
build msys2

00:11:42

passed #584011
build nodebug fedora x86_64

00:04:15

passed #584012
build static fedora x86_64

00:15:24

passed #584013
build static nodebug fedora x86_64

00:05:03

passed #584015
docker windows 1607
build vs2017 amd64

00:10:50

passed #584016
docker windows 1607
build vs2017 x86

00:10:35

 
  Test
passed #584024
check fedora

00:05:23

passed #584025
integration testsuites fedora

00:18:53

failed #584027
valgrind bad

00:08:50

passed #584028
valgrind ges

00:07:47

failed #584026
valgrind good

00:10:32

 
  Integrate
passed #584029
android universal examples

00:07:25

passed #584030
documentation

00:04:32

created #584031
gst-ios-12.2 allowed to fail manual
ios universal examples
 
Name Stage Failure
failed
valgrind good Test
           Total: 668
Uploading artifacts...
gst-build/build/meson-logs/: found 2 matching files
validate-logs: found 1434 matching files

Uploading artifacts to coordinator... ok
id=584026 responseStatus=201 Created token=icWT7oFF
Uploading artifacts...
validate-logs/*.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=584026 responseStatus=201 Created token=icWT7oFF
ERROR: Job failed: exit code 1
failed
valgrind bad Test
           Total: 396
Uploading artifacts...
gst-build/build/meson-logs/: found 2 matching files
validate-logs: found 805 matching files

Uploading artifacts to coordinator... ok
id=584027 responseStatus=201 Created token=9rvhkzk-
Uploading artifacts...
validate-logs/*.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=584027 responseStatus=201 Created token=9rvhkzk-
ERROR: Job failed: exit code 1
failed
build cerbero macos x86_64 Build

Uploading artifacts...
Runtime platform arch=amd64 os=darwin pid=10455 revision=ac2a293c version=11.11.2
manifest.xml: found 1 matching files

cerbero-build/logs: found 37 matching files

WARNING: gstreamer-1.0-1.*.pkg: no matching files
WARNING: gstreamer-1.0-devel-1.*.pkg: no matching files
Uploading artifacts to coordinator... ok
id=584022 responseStatus=201 Created token=5qdCUE5e
ERROR: Job failed: Process exited with: 1. Reason was: ()
failed
gst indent Preparation
 
- GST_ELEMENT_ERROR (qtmux, STREAM, MUX, (NULL),
- ("Failed to push sample."));
+ GST_ELEMENT_ERROR (qtmux, STREAM, MUX, (NULL), ("Failed to push sample."));
return GST_FLOW_ERROR;

}

pad->sample_offset += nsamples;

style diverges, please run gst-indent first
ERROR: Job failed: exit code 1