summaryrefslogtreecommitdiffstats
path: root/ext/jpeg/gstjpegenc.c
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-04-26 13:47:38 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-04-26 13:47:38 +0000
commit46c2655999759820618416f245c06816c33a4e02 (patch)
tree9b29fa2d6f7219979ba6e7dac95f46c5e90f4f24 /ext/jpeg/gstjpegenc.c
parent7d92cdad319d1cd80aee32c7fd25b3862af2d929 (diff)
fix jpeg getcaps so it negotiates correctly
Original commit message from CVS: fix jpeg getcaps so it negotiates correctly
Diffstat (limited to 'ext/jpeg/gstjpegenc.c')
-rw-r--r--ext/jpeg/gstjpegenc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/jpeg/gstjpegenc.c b/ext/jpeg/gstjpegenc.c
index 4e646198..57eaaf91 100644
--- a/ext/jpeg/gstjpegenc.c
+++ b/ext/jpeg/gstjpegenc.c
@@ -230,8 +230,10 @@ gst_jpegenc_getcaps (GstPad * pad)
GstCaps *caps;
const char *name;
int i;
- GstStructure *structure;
+ GstStructure *structure = NULL;
+ /* we want to proxy properties like width, height and framerate from the
+ other end of the element */
otherpad = (pad == jpegenc->srcpad) ? jpegenc->sinkpad : jpegenc->srcpad;
caps = gst_pad_get_allowed_caps (otherpad);
if (pad == jpegenc->srcpad) {
@@ -246,6 +248,11 @@ gst_jpegenc_getcaps (GstPad * pad)
gst_structure_remove_field (structure, "format");
}
+ /* ... but for the sink pad, we only do I420 anyway, so add that */
+ if (pad == jpegenc->sinkpad) {
+ gst_structure_set (structure, "format", GST_TYPE_FOURCC,
+ GST_STR_FOURCC ("I420"), NULL);
+ }
return caps;
}