From: Mark Nauwelaerts Date: Fri, 23 Mar 2012 17:46:36 +0000 (+0100) Subject: tests: qtmux: cleanup element sooner X-Git-Tag: RELEASE-0.11.90~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=43ceadb0dfa85030e0db55be62420ef75b6b7710;p=platform%2Fupstream%2Fgst-plugins-good.git tests: qtmux: cleanup element sooner ... to avoid stray refs in sticky caps events. --- diff --git a/tests/check/elements/qtmux.c b/tests/check/elements/qtmux.c index 5b2aaa6..643a783 100644 --- a/tests/check/elements/qtmux.c +++ b/tests/check/elements/qtmux.c @@ -223,6 +223,9 @@ check_qtmux_pad (GstStaticPadTemplate * srctemplate, const gchar * sinkname, /* at least expect ftyp, mdat header, buffer chunk and moov */ fail_unless (num_buffers >= 4); + /* clean up first to clear any pending refs in sticky caps */ + cleanup_qtmux (qtmux, sinkname); + for (i = 0; i < num_buffers; ++i) { outbuffer = GST_BUFFER (buffers->data); fail_if (outbuffer == NULL); @@ -262,8 +265,6 @@ check_qtmux_pad (GstStaticPadTemplate * srctemplate, const gchar * sinkname, g_list_free (buffers); buffers = NULL; - - cleanup_qtmux (qtmux, sinkname); } static void @@ -311,6 +312,9 @@ check_qtmux_pad_fragmented (GstStaticPadTemplate * srctemplate, * and optionally mfra */ fail_unless (num_buffers >= 5); + /* clean up first to clear any pending refs in sticky caps */ + cleanup_qtmux (qtmux, sinkname); + for (i = 0; i < num_buffers; ++i) { outbuffer = GST_BUFFER (buffers->data); fail_if (outbuffer == NULL); @@ -360,8 +364,6 @@ check_qtmux_pad_fragmented (GstStaticPadTemplate * srctemplate, g_list_free (buffers); buffers = NULL; - - cleanup_qtmux (qtmux, sinkname); } /* dts-method dd */