mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
Fix problem with last checkin -- remove some of the attempts at negotiation and just set the format to I420.
Original commit message from CVS: Fix problem with last checkin -- remove some of the attempts at negotiation and just set the format to I420.
This commit is contained in:
parent
df3920121f
commit
de9bc83c2b
1 changed files with 4 additions and 8 deletions
|
@ -307,21 +307,17 @@ gst_mpeg2dec_alloc_buffer (GstMpeg2dec *mpeg2dec, const mpeg2_info_t *info, gint
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_mpeg2dec_negotiate_format (GstMpeg2dec *mpeg2dec)
|
gst_mpeg2dec_negotiate_format (GstMpeg2dec *mpeg2dec)
|
||||||
{
|
{
|
||||||
GstCaps *allowed;
|
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
guint32 fourcc;
|
guint32 fourcc;
|
||||||
GstPadLinkReturn ret;
|
gboolean ret;
|
||||||
|
|
||||||
if (!GST_PAD_IS_LINKED (mpeg2dec->srcpad)) {
|
if (!GST_PAD_IS_LINKED (mpeg2dec->srcpad)) {
|
||||||
mpeg2dec->format = MPEG2DEC_FORMAT_I420;
|
mpeg2dec->format = MPEG2DEC_FORMAT_I420;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we what we are allowed to do */
|
caps = gst_caps_new_simple ("video/x-raw-yuv",
|
||||||
allowed = gst_pad_get_allowed_caps (mpeg2dec->srcpad);
|
"format", GST_TYPE_FOURCC, GST_STR_FOURCC ("I420"),
|
||||||
caps = gst_caps_copy_1 (allowed);
|
|
||||||
|
|
||||||
gst_caps_set_simple (caps,
|
|
||||||
"width", G_TYPE_INT, mpeg2dec->width,
|
"width", G_TYPE_INT, mpeg2dec->width,
|
||||||
"height", G_TYPE_INT, mpeg2dec->height,
|
"height", G_TYPE_INT, mpeg2dec->height,
|
||||||
"pixel_width", G_TYPE_INT, mpeg2dec->pixel_width,
|
"pixel_width", G_TYPE_INT, mpeg2dec->pixel_width,
|
||||||
|
@ -330,7 +326,7 @@ gst_mpeg2dec_negotiate_format (GstMpeg2dec *mpeg2dec)
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
ret = gst_pad_set_explicit_caps (mpeg2dec->srcpad, caps);
|
ret = gst_pad_set_explicit_caps (mpeg2dec->srcpad, caps);
|
||||||
if (ret != GST_PAD_LINK_OK) return FALSE;
|
if (!ret) return FALSE;
|
||||||
|
|
||||||
/* it worked, try to find what it was again */
|
/* it worked, try to find what it was again */
|
||||||
gst_structure_get_fourcc (gst_caps_get_structure (caps,0),
|
gst_structure_get_fourcc (gst_caps_get_structure (caps,0),
|
||||||
|
|
Loading…
Reference in a new issue