unref events, unref pool

Original commit message from CVS:
unref events, unref pool
This commit is contained in:
Wim Taymans 2002-07-08 19:31:05 +00:00
parent 46b555bd15
commit eebc284b13

View file

@ -453,7 +453,7 @@ gst_dvdec_handle_sink_event (GstDVDec *dvdec)
switch (type) { switch (type) {
case GST_EVENT_EOS: case GST_EVENT_EOS:
gst_pad_event_default (dvdec->sinkpad, event); gst_pad_event_default (dvdec->sinkpad, event);
break; return TRUE;
case GST_EVENT_FLUSH: case GST_EVENT_FLUSH:
break; break;
case GST_EVENT_DISCONTINUOUS: case GST_EVENT_DISCONTINUOUS:
@ -483,7 +483,7 @@ gst_dvdec_handle_sink_event (GstDVDec *dvdec)
g_warning ("unhandled event %d\n", type); g_warning ("unhandled event %d\n", type);
break; break;
} }
gst_event_free (event); gst_event_unref (event);
return TRUE; return TRUE;
} }
@ -527,6 +527,7 @@ gst_dvdec_handle_src_event (GstPad *pad, GstEvent *event)
res = FALSE; res = FALSE;
break; break;
} }
gst_event_unref (event);
return res; return res;
} }
@ -751,6 +752,8 @@ gst_dvdec_change_state (GstElement *element)
case GST_STATE_PAUSED_TO_PLAYING: case GST_STATE_PAUSED_TO_PLAYING:
break; break;
case GST_STATE_PLAYING_TO_PAUSED: case GST_STATE_PLAYING_TO_PAUSED:
if (dvdec->pool)
gst_buffer_pool_unref (dvdec->pool);
dvdec->pool = NULL; dvdec->pool = NULL;
break; break;
case GST_STATE_PAUSED_TO_READY: case GST_STATE_PAUSED_TO_READY: