From 76e4e1449c2504c273a9175f8036894f9774a0bd Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sat, 2 Feb 2002 13:57:30 +0000 Subject: [PATCH] Destroy the bytestream object when we go to paused Original commit message from CVS: Destroy the bytestream object when we go to paused --- gst/mpegstream/gstmpegparse.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gst/mpegstream/gstmpegparse.c b/gst/mpegstream/gstmpegparse.c index 0db9f68087..0908989af6 100644 --- a/gst/mpegstream/gstmpegparse.c +++ b/gst/mpegstream/gstmpegparse.c @@ -302,12 +302,12 @@ gst_mpeg_parse_change_state (GstElement *element) GstMPEGParse *mpeg_parse = GST_MPEG_PARSE (element); switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_NULL_TO_READY: + case GST_STATE_READY_TO_PAUSED: if (!mpeg_parse->packetize) { mpeg_parse->packetize = gst_mpeg_packetize_new (mpeg_parse->sinkpad, GST_MPEG_PACKETIZE_SYSTEM); } break; - case GST_STATE_READY_TO_NULL: + case GST_STATE_PAUSED_TO_READY: if (mpeg_parse->packetize) { gst_mpeg_packetize_destroy (mpeg_parse->packetize); mpeg_parse->packetize = NULL; @@ -317,9 +317,7 @@ gst_mpeg_parse_change_state (GstElement *element) break; } - GST_ELEMENT_CLASS (parent_class)->change_state (element); - - return GST_STATE_SUCCESS; + return GST_ELEMENT_CLASS (parent_class)->change_state (element); } static void