amrnbenc: remove global variables
authorJordan Petridis <jordan@centricular.com>
Wed, 15 Jul 2020 07:49:03 +0000 (10:49 +0300)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 29 Jul 2020 08:38:31 +0000 (08:38 +0000)
gstcheck is declaring its own buffers glist which ends up
overwritten, loks like the code meant to use that already

gcc 10 is also complaining about this, but only on static
builds for some reason

```
FAILED: subprojects/gst-plugins-ugly/tests/check/elements_amrnbenc
/usr/bin/ld: subprojects/gstreamer/libs/gst/check/libgstcheck-1.0.a(gstcheck.c.o):(.bss+0x38): multiple definition of `buffers'; subprojects/gst-plugins-ugly/tests/check/708af1f@@elements_amrnbenc@exe/elements_amrnbenc.c.o:(.bss+0x18): first defined here
collect2: error: ld returned 1 exit status
```

also remove unused var `current_buf`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/merge_requests/62>

tests/check/elements/amrnbenc.c

index 4f9b4b508229e8e34dc39fbb1be8013825eadae5..3875e80a767b5fd4d6a5d91fcb01b35e22952b23 100644 (file)
     "layout = (string) interleaved, channels = (int) 1, rate = (int) 8000"
 #define SINK_CAPS "audio/AMR"
 
-GList *buffers;
-GList *current_buf = NULL;
-
-GstPad *srcpad, *sinkpad;
+static GstPad *srcpad, *sinkpad;
 
 static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,