diff options
author | Julien Moutte <julien@moutte.net> | 2004-01-12 16:48:48 +0000 |
---|---|---|
committer | Julien Moutte <julien@moutte.net> | 2004-01-12 16:48:48 +0000 |
commit | bbf8b3e7230b95b196c6595e51850422bf52cf99 (patch) | |
tree | a5246226b18031fac1154ad57334d40093c2f237 /gst-libs/gst/play/play.c | |
parent | 99eb383a85b1f07f0e10784ccd603dab975851ea (diff) | |
download | gst-plugins-bad-bbf8b3e7230b95b196c6595e51850422bf52cf99.tar.gz gst-plugins-bad-bbf8b3e7230b95b196c6595e51850422bf52cf99.tar.bz2 gst-plugins-bad-bbf8b3e7230b95b196c6595e51850422bf52cf99.zip |
gst-libs/gst/play/gstplay.c: When analyzing the pads of an element the bin is mostly in READY state so no caps were n...
Original commit message from CVS:
2004-01-12 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/play/gstplay.c: (gst_play_get_sink_element): When
analyzing the pads of an element the bin is mostly in READY state so
no caps were negotiated. This helper function needs to work with
_get_caps directly then. I was not freeing them though, added that to
fix the mem leak.
Diffstat (limited to 'gst-libs/gst/play/play.c')
-rw-r--r-- | gst-libs/gst/play/play.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gst-libs/gst/play/play.c b/gst-libs/gst/play/play.c index bcc5c4d1..dee3f8ef 100644 --- a/gst-libs/gst/play/play.c +++ b/gst-libs/gst/play/play.c @@ -923,14 +923,14 @@ gst_play_get_sink_element (GstPlay *play, } else { /* If not a src pad checking caps */ - const GstCaps *caps; + GstCaps *caps; GstStructure *structure; gboolean has_video_cap = FALSE; gboolean has_audio_cap = FALSE; - caps = gst_pad_get_negotiated_caps (GST_PAD (pads->data)); + caps = gst_pad_get_caps (GST_PAD (pads->data)); structure = gst_caps_get_structure (caps, 0); - + if (strcmp (gst_structure_get_name (structure), "audio/x-raw-int") == 0) { has_audio_cap = TRUE; @@ -943,6 +943,8 @@ gst_play_get_sink_element (GstPlay *play, has_video_cap = TRUE; } + gst_caps_free (caps); + switch (sink_type) { case GST_PLAY_SINK_TYPE_AUDIO: if (has_audio_cap) |