From 71900c434212e3c40b92f4e2cc8798393d678518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 25 Apr 2012 13:46:00 +0200 Subject: [PATCH] video: Only use the interlacing buffer flags if the caps specify interlaced video --- gst-libs/gst/video/video.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gst-libs/gst/video/video.c b/gst-libs/gst/video/video.c index 63a690fe77..32f097ba02 100644 --- a/gst-libs/gst/video/video.c +++ b/gst-libs/gst/video/video.c @@ -1097,12 +1097,14 @@ gst_video_frame_map_id (GstVideoFrame * frame, GstVideoInfo * info, frame->id = id; frame->flags = 0; - 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)) - frame->flags |= GST_VIDEO_FRAME_FLAG_RFF; - if (GST_BUFFER_FLAG_IS_SET (buffer, GST_VIDEO_BUFFER_FLAG_ONEFIELD)) - frame->flags |= GST_VIDEO_FRAME_FLAG_ONEFIELD; + if (GST_VIDEO_INFO_IS_INTERLACED (info)) { + 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)) + frame->flags |= GST_VIDEO_FRAME_FLAG_RFF; + if (GST_BUFFER_FLAG_IS_SET (buffer, GST_VIDEO_BUFFER_FLAG_ONEFIELD)) + frame->flags |= GST_VIDEO_FRAME_FLAG_ONEFIELD; + } gst_buffer_map (buffer, &frame->map[0], flags);