mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
avvidenc: Correctly signal interlaced input to ffmpeg when the input caps are interlaced
Regression from 1e4529ced2
This commit is contained in:
parent
8e948f9e14
commit
6359385df5
1 changed files with 5 additions and 2 deletions
|
@ -254,6 +254,10 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder,
|
|||
/* additional avcodec settings */
|
||||
gst_ffmpeg_cfg_fill_context (G_OBJECT (ffmpegenc), ffmpegenc->context);
|
||||
|
||||
if (GST_VIDEO_INFO_IS_INTERLACED (&state->info))
|
||||
ffmpegenc->context->flags |=
|
||||
AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME;
|
||||
|
||||
/* and last but not least the pass; CBR, 2-pass, etc */
|
||||
ffmpegenc->context->flags |= ffmpegenc->pass;
|
||||
switch (ffmpegenc->pass) {
|
||||
|
@ -554,8 +558,7 @@ gst_ffmpegvidenc_send_frame (GstFFMpegVidEnc * ffmpegenc,
|
|||
|
||||
gst_ffmpegvidenc_add_cc (frame->input_buffer, picture);
|
||||
|
||||
if (ffmpegenc->context->flags & (AV_CODEC_FLAG_INTERLACED_DCT |
|
||||
AV_CODEC_FLAG_INTERLACED_ME)) {
|
||||
if (GST_VIDEO_INFO_IS_INTERLACED (&ffmpegenc->input_state->info)) {
|
||||
picture->interlaced_frame = TRUE;
|
||||
/* if this is not the case, a filter element should be used to swap fields */
|
||||
picture->top_field_first =
|
||||
|
|
Loading…
Reference in a new issue