diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-07-17 12:31:52 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-07-17 12:31:52 +0100 |
commit | ad04636c6eb45075da8ef65f8d17e29b4eaeffd9 (patch) | |
tree | 23a3b0549b62d7c1a4d3da5581b07fdf9e61d0b1 | |
parent | 93ef1b687e57cbc90733460de021a54db0ef351d (diff) |
avdeinterlace: detect interlaced input properly
It's not a boolean field any more, and called "interlaced-mode" now.
-rw-r--r-- | ext/ffmpeg/gstffmpegdeinterlace.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/ffmpeg/gstffmpegdeinterlace.c b/ext/ffmpeg/gstffmpegdeinterlace.c index 56aa1aa..0e39400 100644 --- a/ext/ffmpeg/gstffmpegdeinterlace.c +++ b/ext/ffmpeg/gstffmpegdeinterlace.c @@ -189,17 +189,22 @@ gst_ffmpegdeinterlace_sink_setcaps (GstPad * pad, GstCaps * caps) GstFFMpegDeinterlace *deinterlace = GST_FFMPEGDEINTERLACE (gst_pad_get_parent (pad)); GstStructure *structure = gst_caps_get_structure (caps, 0); + const gchar *imode; AVCodecContext *ctx; GstCaps *src_caps; gboolean ret; + /* FIXME: use GstVideoInfo etc. */ if (!gst_structure_get_int (structure, "width", &deinterlace->width)) return FALSE; if (!gst_structure_get_int (structure, "height", &deinterlace->height)) return 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); ctx = avcodec_alloc_context (); |