From 052a1d0f1ea1785ae51b15c5687f98128e04acdf Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 25 Mar 2013 09:59:45 +0100 Subject: [PATCH] video: set interlaced flag correctly in frame We only look at the interlaced buffer flag in mixed mode, in other modes we always need to set the interlaced flag. --- gst-libs/gst/video/video-frame.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/video/video-frame.c b/gst-libs/gst/video/video-frame.c index 5ae3095..2c4a1e8 100644 --- a/gst-libs/gst/video/video-frame.c +++ b/gst-libs/gst/video/video-frame.c @@ -107,8 +107,13 @@ gst_video_frame_map_id (GstVideoFrame * frame, GstVideoInfo * info, /* buffer flags enhance the frame flags */ if (GST_VIDEO_INFO_IS_INTERLACED (info)) { - if (GST_BUFFER_FLAG_IS_SET (buffer, GST_VIDEO_BUFFER_FLAG_INTERLACED)) + if (GST_VIDEO_INFO_INTERLACE_MODE (info) == GST_VIDEO_INTERLACE_MODE_MIXED) { + if (GST_BUFFER_FLAG_IS_SET (buffer, GST_VIDEO_BUFFER_FLAG_INTERLACED)) { + frame->flags |= GST_VIDEO_FRAME_FLAG_INTERLACED; + } + } else frame->flags |= GST_VIDEO_FRAME_FLAG_INTERLACED; + if (GST_BUFFER_FLAG_IS_SET (buffer, GST_VIDEO_BUFFER_FLAG_TFF)) frame->flags |= GST_VIDEO_FRAME_FLAG_TFF; if (GST_BUFFER_FLAG_IS_SET (buffer, GST_VIDEO_BUFFER_FLAG_RFF)) -- 2.7.4