diff --git a/gst-libs/gst/codecs/gstmpeg2decoder.c b/gst-libs/gst/codecs/gstmpeg2decoder.c index aaede9bce1..49e88b393b 100644 --- a/gst-libs/gst/codecs/gstmpeg2decoder.c +++ b/gst-libs/gst/codecs/gstmpeg2decoder.c @@ -814,6 +814,11 @@ gst_mpeg2_decoder_ensure_current_picture (GstMpeg2Decoder * decoder, gst_mpeg2_picture_unref (picture); return FALSE; } + + /* At this moment, this picture should be interlaced */ + picture->buffer_flags |= GST_VIDEO_BUFFER_FLAG_INTERLACED; + if (priv->pic_ext.top_field_first) + picture->buffer_flags |= GST_VIDEO_BUFFER_FLAG_TFF; } picture->structure = priv->pic_ext.picture_structure; diff --git a/gst-libs/gst/codecs/gstmpeg2picture.h b/gst-libs/gst/codecs/gstmpeg2picture.h index 819c7691aa..7262c96716 100644 --- a/gst-libs/gst/codecs/gstmpeg2picture.h +++ b/gst-libs/gst/codecs/gstmpeg2picture.h @@ -23,6 +23,7 @@ #include #include +#include G_BEGIN_DECLS @@ -82,6 +83,8 @@ struct _GstMpeg2Picture /* For interlaced streams */ GstMpeg2Picture *first_field; + GstVideoBufferFlags buffer_flags; + gint pic_order_cnt; gint tsn; GstMpegVideoPictureStructure structure;