projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5872bcc
)
appsrc: handle NULL caps correctly
author
Wim Taymans
<wim.taymans@collabora.co.uk>
Thu, 19 Jan 2012 14:18:58 +0000
(15:18 +0100)
committer
Wim Taymans
<wim.taymans@collabora.co.uk>
Thu, 19 Jan 2012 14:18:58 +0000
(15:18 +0100)
gst-libs/gst/app/gstappsrc.c
patch
|
blob
|
history
diff --git
a/gst-libs/gst/app/gstappsrc.c
b/gst-libs/gst/app/gstappsrc.c
index
b355ea2
..
0b8012b
100644
(file)
--- a/
gst-libs/gst/app/gstappsrc.c
+++ b/
gst-libs/gst/app/gstappsrc.c
@@
-1120,12
+1120,15
@@
gst_app_src_get_caps (GstAppSrc * appsrc, GstCaps * filter)
gst_caps_ref (caps);
if (filter) {
- GstCaps *intersection =
- gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
- gst_caps_unref (caps);
- caps = intersection;
+ if (caps) {
+ GstCaps *intersection =
+ gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
+ gst_caps_unref (caps);
+ caps = intersection;
+ } else {
+ caps = gst_caps_ref (filter);
+ }
}
-
GST_DEBUG_OBJECT (appsrc, "getting caps of %" GST_PTR_FORMAT, caps);
GST_OBJECT_UNLOCK (appsrc);