gst-plugins-base: video: Only use the interlacing buffer flags if the caps specify interlaced video

Sebastian Dröge slomo at kemper.freedesktop.org
Wed Apr 25 04:46:26 PDT 2012


Module: gst-plugins-base
Branch: master
Commit: 71900c434212e3c40b92f4e2cc8798393d678518
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=71900c434212e3c40b92f4e2cc8798393d678518

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Wed Apr 25 13:46:00 2012 +0200

video: Only use the interlacing buffer flags if the caps specify interlaced video

---

 gst-libs/gst/video/video.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/gst-libs/gst/video/video.c b/gst-libs/gst/video/video.c
index 63a690f..32f097b 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);
 



More information about the gstreamer-commits mailing list