mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-04 09:42:19 +00:00
avdeinterlace: detect interlaced input properly
It's not a boolean field any more, and called "interlaced-mode" now.
This commit is contained in:
parent
93ef1b687e
commit
ad04636c6e
1 changed files with 6 additions and 1 deletions
|
@ -189,17 +189,22 @@ gst_ffmpegdeinterlace_sink_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
GstFFMpegDeinterlace *deinterlace =
|
GstFFMpegDeinterlace *deinterlace =
|
||||||
GST_FFMPEGDEINTERLACE (gst_pad_get_parent (pad));
|
GST_FFMPEGDEINTERLACE (gst_pad_get_parent (pad));
|
||||||
GstStructure *structure = gst_caps_get_structure (caps, 0);
|
GstStructure *structure = gst_caps_get_structure (caps, 0);
|
||||||
|
const gchar *imode;
|
||||||
AVCodecContext *ctx;
|
AVCodecContext *ctx;
|
||||||
GstCaps *src_caps;
|
GstCaps *src_caps;
|
||||||
gboolean ret;
|
gboolean ret;
|
||||||
|
|
||||||
|
/* FIXME: use GstVideoInfo etc. */
|
||||||
if (!gst_structure_get_int (structure, "width", &deinterlace->width))
|
if (!gst_structure_get_int (structure, "width", &deinterlace->width))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!gst_structure_get_int (structure, "height", &deinterlace->height))
|
if (!gst_structure_get_int (structure, "height", &deinterlace->height))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
deinterlace->interlaced = FALSE;
|
deinterlace->interlaced = FALSE;
|
||||||
gst_structure_get_boolean (structure, "interlaced", &deinterlace->interlaced);
|
imode = gst_structure_get_string (structure, "interlace-mode");
|
||||||
|
if (imode && (!strcmp (imode, "interleaved") || !strcmp (imode, "mixed"))) {
|
||||||
|
deinterlace->interlaced = TRUE;
|
||||||
|
}
|
||||||
gst_ffmpegdeinterlace_update_passthrough (deinterlace);
|
gst_ffmpegdeinterlace_update_passthrough (deinterlace);
|
||||||
|
|
||||||
ctx = avcodec_alloc_context ();
|
ctx = avcodec_alloc_context ();
|
||||||
|
|
Loading…
Reference in a new issue