mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
codecs: Add buffer_flags for mpeg2 picture.
We need to store the buffer flags such as GST_VIDEO_BUFFER_FLAG_INTERLACED and GST_VIDEO_BUFFER_FLAG_TFF for interlaced video. Without these flags, the VPP and display elements can not apply filter correctly. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1929>
This commit is contained in:
parent
339a816c81
commit
459abad096
2 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <gst/codecs/codecs-prelude.h>
|
||||
#include <gst/codecparsers/gstmpegvideoparser.h>
|
||||
#include <gst/video/video.h>
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue