summaryrefslogtreecommitdiff
path: root/gst/imagefreeze
diff options
context:
space:
mode:
authorDave Craig <dcraig@brightsign.biz>2015-12-16 12:40:39 +0000
committerSebastian Dröge <sebastian@centricular.com>2016-02-23 18:11:42 +0200
commit211c8492b35d1e58033d9104ec8b52d497f475fb (patch)
treed288d1b1e858c6a4754f8f23fae5d462ef69a42a /gst/imagefreeze
parent6cdbf406224494335940b2ac9ab9354453406ed3 (diff)
downloadgstreamer-plugins-good-211c8492b35d1e58033d9104ec8b52d497f475fb.tar.gz
gst: Don't assume that get_current_caps() returns non-NULL caps after has_current_caps()
Remove calls to gst_pad_has_current_caps() which then go on to call gst_pad_get_current_caps() as the caps can go to NULL in between. Instead just use gst_pad_get_current_caps() and check for NULL. https://bugzilla.gnome.org/show_bug.cgi?id=759539
Diffstat (limited to 'gst/imagefreeze')
-rw-r--r--gst/imagefreeze/gstimagefreeze.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/imagefreeze/gstimagefreeze.c b/gst/imagefreeze/gstimagefreeze.c
index bc8bf8167..8b1bfc5b1 100644
--- a/gst/imagefreeze/gstimagefreeze.c
+++ b/gst/imagefreeze/gstimagefreeze.c
@@ -265,8 +265,8 @@ gst_image_freeze_sink_getcaps (GstImageFreeze * self, GstCaps * filter)
GstPad *pad;
pad = self->sinkpad;
- if (gst_pad_has_current_caps (pad)) {
- ret = gst_pad_get_current_caps (pad);
+ ret = gst_pad_get_current_caps (pad);
+ if (ret != NULL) {
goto done;
}