mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
e07b1913fc
commit
a150b2e3a0
|
@ -3389,6 +3389,12 @@ static int init_output_stream_encode(OutputStream *ost)
|
||||||
enc_ctx->bits_per_raw_sample = frame_bits_per_raw_sample;
|
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 (ost->forced_keyframes) {
|
||||||
if (!strncmp(ost->forced_keyframes, "expr:", 5)) {
|
if (!strncmp(ost->forced_keyframes, "expr:", 5)) {
|
||||||
ret = av_expr_parse(&ost->forced_keyframes_pexpr, ost->forced_keyframes+5,
|
ret = av_expr_parse(&ost->forced_keyframes_pexpr, ost->forced_keyframes+5,
|
||||||
|
|
Loading…
Reference in New Issue