diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-03-25 09:59:45 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-03-25 09:59:45 +0100 |
commit | 052a1d0f1ea1785ae51b15c5687f98128e04acdf (patch) | |
tree | 122380369003ba97726870d391aa508353ba7680 /gst-libs | |
parent | f18d2a5a9a27de45539089b2f3a38bddf74cd784 (diff) |
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.
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/video/video-frame.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gst-libs/gst/video/video-frame.c b/gst-libs/gst/video/video-frame.c index 5ae30953d..2c4a1e86f 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)) |