Skip to content

Commit

Permalink
Set the field order when interlace is on
Browse files Browse the repository at this point in the history
  • Loading branch information
eisneinechse committed Jun 16, 2020
1 parent 73d1689 commit 56736e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/FFmpegWriter.cpp
Expand Up @@ -340,6 +340,12 @@ void FFmpegWriter::SetOption(StreamType stream, std::string name, std::string va
st = video_st;
// Get codec context
c = AV_GET_CODEC_PAR_CONTEXT(st, video_codec);
// Was a codec / stream found?
if (c) {
if (info.interlaced_frame) {
c->field_order = info.top_field_first ? AV_FIELD_TT : AV_FIELD_BB;
}
}
} else if (info.has_audio && stream == AUDIO_STREAM && audio_st) {
st = audio_st;
// Get codec context
Expand Down

0 comments on commit 56736e9

Please sign in to comment.