flacparse: Free GstBaseParseFrame if pushing a header failed
authorMatej Knopp <matej.knopp@gmail.com>
Tue, 3 Sep 2013 08:10:01 +0000 (10:10 +0200)
committerSebastian Dröge <slomo@circular-chaos.org>
Tue, 3 Sep 2013 08:10:49 +0000 (10:10 +0200)
gst/audioparsers/gstflacparse.c

index cddc62a..8ac2804 100644 (file)
@@ -1347,9 +1347,9 @@ push_headers:
     frame.buffer = buf;
     frame.overhead = -1;
     res = gst_base_parse_push_frame (GST_BASE_PARSE (flacparse), &frame);
+    gst_base_parse_frame_free (&frame);
     if (res != GST_FLOW_OK)
       break;
-    gst_base_parse_frame_free (&frame);
   }
   g_list_foreach (flacparse->headers, (GFunc) gst_mini_object_unref, NULL);
   g_list_free (flacparse->headers);