diff options
author | Tobias Rapp <t.rapp@noa-archive.com> | 2018-04-26 14:23:02 +0200 |
---|---|---|
committer | Tobias Rapp <t.rapp@noa-archive.com> | 2018-05-02 08:35:08 +0200 |
commit | a150b2e3a099fd539ecc6664050fd20617ce223c (patch) | |
tree | 4d4302004b12a897a1872766392cd81f30c6cda2 /fftools | |
parent | e07b1913fc67b9244d82d49d2ab3cd661215c928 (diff) | |
download | ffmpeg-a150b2e3a099fd539ecc6664050fd20617ce223c.tar.gz |
fftools/ffmpeg: properly initialize output stream field order
Fixes stream field order written by avformat_write_header when "top"
option is specified on the command-line.
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
Diffstat (limited to 'fftools')
-rw-r--r-- | fftools/ffmpeg.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 5dc198f933..5a19a09d9a 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3389,6 +3389,12 @@ static int init_output_stream_encode(OutputStream *ost) enc_ctx->bits_per_raw_sample = frame_bits_per_raw_sample; } + if (ost->top_field_first == 0) { + enc_ctx->field_order = AV_FIELD_BB; + } else if (ost->top_field_first == 1) { + enc_ctx->field_order = AV_FIELD_TT; + } + if (ost->forced_keyframes) { if (!strncmp(ost->forced_keyframes, "expr:", 5)) { ret = av_expr_parse(&ost->forced_keyframes_pexpr, ost->forced_keyframes+5, |