playsink: Only unref ts_offset elements if they're not NULL

This commit is contained in:
Sebastian Dröge 2011-08-31 14:45:08 +02:00
parent 425d3ae7bc
commit 49b301bcd6

View file

@ -2311,6 +2311,7 @@ gst_play_sink_reconfigure (GstPlaySink * playsink)
add_chain (GST_PLAY_CHAIN (playsink->videochain), FALSE);
activate_chain (GST_PLAY_CHAIN (playsink->videochain), FALSE);
if (playsink->videochain->ts_offset)
g_object_unref (playsink->videochain->ts_offset);
playsink->videochain->ts_offset = NULL;
}
@ -2365,6 +2366,7 @@ gst_play_sink_reconfigure (GstPlaySink * playsink)
disconnect_chain (playsink->audiochain, playsink);
playsink->audiochain->volume = NULL;
playsink->audiochain->mute = NULL;
if (playsink->audiochain->ts_offset)
g_object_unref (playsink->audiochain->ts_offset);
playsink->audiochain->ts_offset = NULL;
free_chain ((GstPlayChain *) playsink->audiochain);
@ -2434,6 +2436,7 @@ gst_play_sink_reconfigure (GstPlaySink * playsink)
disconnect_chain (playsink->audiochain, playsink);
playsink->audiochain->volume = NULL;
playsink->audiochain->mute = NULL;
if (playsink->audiochain->ts_offset)
g_object_unref (playsink->audiochain->ts_offset);
playsink->audiochain->ts_offset = NULL;
}
@ -3441,6 +3444,7 @@ gst_play_sink_change_state (GstElement * element, GstStateChange transition)
disconnect_chain (playsink->audiochain, playsink);
playsink->audiochain->volume = NULL;
playsink->audiochain->mute = NULL;
if (playsink->audiochain->ts_offset)
g_object_unref (playsink->audiochain->ts_offset);
playsink->audiochain->ts_offset = NULL;
}