mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 13:11:06 +00:00
avvidenc: Only use 2 ticks per frame if encoding interlaced video
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3518 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6505>
This commit is contained in:
parent
03465d0904
commit
ee518b9c7e
1 changed files with 3 additions and 1 deletions
|
@ -630,7 +630,9 @@ gst_ffmpegvidenc_send_frame (GstFFMpegVidEnc * ffmpegenc,
|
||||||
picture->pts = AV_NOPTS_VALUE;
|
picture->pts = AV_NOPTS_VALUE;
|
||||||
} else {
|
} else {
|
||||||
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(60, 31, 100)
|
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(60, 31, 100)
|
||||||
const gint ticks_per_frame = (ffmpegenc->context->codec_descriptor
|
const gint ticks_per_frame =
|
||||||
|
(GST_VIDEO_INFO_IS_INTERLACED (&ffmpegenc->input_state->info)
|
||||||
|
&& ffmpegenc->context->codec_descriptor
|
||||||
&& ffmpegenc->context->
|
&& ffmpegenc->context->
|
||||||
codec_descriptor->props & AV_CODEC_PROP_FIELDS) ? 2 : 1;
|
codec_descriptor->props & AV_CODEC_PROP_FIELDS) ? 2 : 1;
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue