mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
mfvideoenc: Set PAR to output IMFMediaType
We've set it to input IMFMediaType but not for output. So, if PAR is not 1:1, the input IMFMediaType will be accepted by MFT (default is 1:1). The PAR of input/output IMFMediaType must be identical Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1322>
This commit is contained in:
parent
cec6858401
commit
0f74785b8e
1 changed files with 8 additions and 0 deletions
|
@ -173,6 +173,14 @@ gst_mf_video_enc_set_format (GstVideoEncoder * enc, GstVideoCodecState * state)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
hr = MFSetAttributeRatio (out_type.Get (), MF_MT_PIXEL_ASPECT_RATIO,
|
||||
GST_VIDEO_INFO_PAR_N (info), GST_VIDEO_INFO_PAR_D (info));
|
||||
if (!gst_mf_result (hr)) {
|
||||
GST_ERROR_OBJECT (self, "Couldn't set par %d/%d",
|
||||
GST_VIDEO_INFO_PAR_N (info), GST_VIDEO_INFO_PAR_D (info));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
hr = out_type->SetUINT32 (MF_MT_INTERLACE_MODE, MFVideoInterlace_Progressive);
|
||||
if (!gst_mf_result (hr)) {
|
||||
GST_ERROR_OBJECT (self,
|
||||
|
|
Loading…
Reference in a new issue