mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +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
|
||||
gst_mpeg2dec_negotiate_format (GstMpeg2dec *mpeg2dec)
|
||||
{
|
||||
GstCaps *allowed;
|
||||
GstCaps *caps;
|
||||
guint32 fourcc;
|
||||
GstPadLinkReturn ret;
|
||||
gboolean ret;
|
||||
|
||||
if (!GST_PAD_IS_LINKED (mpeg2dec->srcpad)) {
|
||||
mpeg2dec->format = MPEG2DEC_FORMAT_I420;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* we what we are allowed to do */
|
||||
allowed = gst_pad_get_allowed_caps (mpeg2dec->srcpad);
|
||||
caps = gst_caps_copy_1 (allowed);
|
||||
|
||||
gst_caps_set_simple (caps,
|
||||
caps = gst_caps_new_simple ("video/x-raw-yuv",
|
||||
"format", GST_TYPE_FOURCC, GST_STR_FOURCC ("I420"),
|
||||
"width", G_TYPE_INT, mpeg2dec->width,
|
||||
"height", G_TYPE_INT, mpeg2dec->height,
|
||||
"pixel_width", G_TYPE_INT, mpeg2dec->pixel_width,
|
||||
|
@ -330,7 +326,7 @@ gst_mpeg2dec_negotiate_format (GstMpeg2dec *mpeg2dec)
|
|||
NULL);
|
||||
|
||||
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 */
|
||||
gst_structure_get_fourcc (gst_caps_get_structure (caps,0),
|
||||
|
|
Loading…
Reference in a new issue