diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2004-01-25 12:31:29 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2004-01-25 12:31:29 +0000 |
commit | e202a025fe28c6339fb10092fc80ff983f941691 (patch) | |
tree | 85c7d5defca93cc5047370cb2a55349b2e6f1322 /ext/divx/gstdivxdec.c | |
parent | a77fcb5d88102e0674add81df2d1a999b107a715 (diff) | |
download | gst-plugins-bad-e202a025fe28c6339fb10092fc80ff983f941691.tar.gz gst-plugins-bad-e202a025fe28c6339fb10092fc80ff983f941691.tar.bz2 gst-plugins-bad-e202a025fe28c6339fb10092fc80ff983f941691.zip |
ext/divx/gstdivxdec.c: Fix for new capsnego - also fixes gst-player with divxdec.
Original commit message from CVS:
2004-01-25 Ronald Bultje <rbultje@ronald.bitfreak.net>
* ext/divx/gstdivxdec.c: (gst_divxdec_init),
(gst_divxdec_negotiate):
Fix for new capsnego - also fixes gst-player with divxdec.
Diffstat (limited to 'ext/divx/gstdivxdec.c')
-rw-r--r-- | ext/divx/gstdivxdec.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/ext/divx/gstdivxdec.c b/ext/divx/gstdivxdec.c index 869858a2..192c655e 100644 --- a/ext/divx/gstdivxdec.c +++ b/ext/divx/gstdivxdec.c @@ -173,7 +173,6 @@ gst_divxdec_init (GstDivxDec *divxdec) gst_static_pad_template_get (&sink_template), "sink"); gst_element_add_pad(GST_ELEMENT(divxdec), divxdec->sinkpad); - gst_pad_set_chain_function(divxdec->sinkpad, gst_divxdec_chain); gst_pad_set_link_function(divxdec->sinkpad, gst_divxdec_connect); @@ -182,6 +181,7 @@ gst_divxdec_init (GstDivxDec *divxdec) gst_static_pad_template_get (&src_template), "src"); gst_element_add_pad(GST_ELEMENT(divxdec), divxdec->srcpad); + gst_pad_use_explicit_caps (divxdec->srcpad); /* bitrate, etc. */ divxdec->width = divxdec->height = divxdec->csp = divxdec->bitcnt = -1; @@ -324,7 +324,6 @@ gst_divxdec_chain (GstPad *pad, static GstPadLinkReturn gst_divxdec_negotiate (GstDivxDec *divxdec) { - GstPadLinkReturn ret; GstCaps *caps; struct { guint32 fourcc; @@ -414,14 +413,12 @@ gst_divxdec_negotiate (GstDivxDec *divxdec) NULL); /*}*/ - if ((ret = gst_pad_try_set_caps(divxdec->srcpad, caps)) > 0) { + if (gst_divxdec_setup(divxdec) && + gst_pad_set_explicit_caps(divxdec->srcpad, caps)) { divxdec->csp = fmt_list[i].csp; divxdec->bpp = fmt_list[i].bpp; divxdec->bitcnt = fmt_list[i].bitcnt; - if (gst_divxdec_setup(divxdec)) - return GST_PAD_LINK_OK; - } else if (ret == GST_PAD_LINK_DELAYED) { - return ret; /* trying more is useless */ + return GST_PAD_LINK_OK; } } |