mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 12:41:05 +00:00
videoencoder: Proxy the interlaced buffer flags to the GstVideoCodecFrame
This commit is contained in:
parent
71fc0a7f3e
commit
47e169b0b5
1 changed files with 20 additions and 0 deletions
|
@ -1087,6 +1087,26 @@ gst_video_encoder_new_frame (GstVideoEncoder * encoder, GstBuffer * buf,
|
|||
frame->pts = timestamp;
|
||||
frame->duration = duration;
|
||||
|
||||
if (GST_VIDEO_INFO_IS_INTERLACED (&encoder->priv->input_state->info)) {
|
||||
if (GST_BUFFER_FLAG_IS_SET (buf, GST_VIDEO_BUFFER_FLAG_TFF)) {
|
||||
GST_VIDEO_CODEC_FRAME_FLAG_SET (frame, GST_VIDEO_CODEC_FRAME_FLAG_TFF);
|
||||
} else {
|
||||
GST_VIDEO_CODEC_FRAME_FLAG_UNSET (frame, GST_VIDEO_CODEC_FRAME_FLAG_TFF);
|
||||
}
|
||||
if (GST_BUFFER_FLAG_IS_SET (buf, GST_VIDEO_BUFFER_FLAG_RFF)) {
|
||||
GST_VIDEO_CODEC_FRAME_FLAG_SET (frame, GST_VIDEO_CODEC_FRAME_FLAG_RFF);
|
||||
} else {
|
||||
GST_VIDEO_CODEC_FRAME_FLAG_UNSET (frame, GST_VIDEO_CODEC_FRAME_FLAG_RFF);
|
||||
}
|
||||
if (GST_BUFFER_FLAG_IS_SET (buf, GST_VIDEO_BUFFER_FLAG_ONEFIELD)) {
|
||||
GST_VIDEO_CODEC_FRAME_FLAG_SET (frame,
|
||||
GST_VIDEO_CODEC_FRAME_FLAG_ONEFIELD);
|
||||
} else {
|
||||
GST_VIDEO_CODEC_FRAME_FLAG_UNSET (frame,
|
||||
GST_VIDEO_CODEC_FRAME_FLAG_ONEFIELD);
|
||||
}
|
||||
}
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue