dshowsrcwrapper: Fixed null caps comparison
https://bugzilla.gnome.org/show_bug.cgi?id=741086
This commit is contained in:
parent
c306e0dfa7
commit
d627f4b93b
@ -454,12 +454,13 @@ gst_dshowaudiosrc_prepare (GstAudioSrc * asrc, GstAudioRingBufferSpec * spec)
|
|||||||
GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc);
|
GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc);
|
||||||
GstCaps *current_caps = gst_pad_get_current_caps (GST_BASE_SRC_PAD (asrc));
|
GstCaps *current_caps = gst_pad_get_current_caps (GST_BASE_SRC_PAD (asrc));
|
||||||
|
|
||||||
|
if (current_caps) {
|
||||||
if (gst_caps_is_equal (spec->caps, current_caps)) {
|
if (gst_caps_is_equal (spec->caps, current_caps)) {
|
||||||
gst_caps_unref (current_caps);
|
gst_caps_unref (current_caps);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
gst_caps_unref (current_caps);
|
gst_caps_unref (current_caps);
|
||||||
|
}
|
||||||
/* In 1.0, prepare() seems to be called in the PLAYING state. Most
|
/* In 1.0, prepare() seems to be called in the PLAYING state. Most
|
||||||
of the time you can't do much on a running graph. */
|
of the time you can't do much on a running graph. */
|
||||||
|
|
||||||
|
@ -578,11 +578,13 @@ gst_dshowvideosrc_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
|
|||||||
GstStructure *s = gst_caps_get_structure (caps, 0);
|
GstStructure *s = gst_caps_get_structure (caps, 0);
|
||||||
GstCaps *current_caps = gst_pad_get_current_caps (GST_BASE_SRC_PAD (bsrc));
|
GstCaps *current_caps = gst_pad_get_current_caps (GST_BASE_SRC_PAD (bsrc));
|
||||||
|
|
||||||
|
if (current_caps) {
|
||||||
if (gst_caps_is_equal (caps, current_caps)) {
|
if (gst_caps_is_equal (caps, current_caps)) {
|
||||||
gst_caps_unref (current_caps);
|
gst_caps_unref (current_caps);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
gst_caps_unref (current_caps);
|
gst_caps_unref (current_caps);
|
||||||
|
}
|
||||||
|
|
||||||
/* Same remark as in gstdshowaudiosrc. */
|
/* Same remark as in gstdshowaudiosrc. */
|
||||||
gboolean was_running = src->is_running;
|
gboolean was_running = src->is_running;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user