diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-10 01:34:33 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-10 01:34:33 +0400 |
commit | f233666880afd1f2c0b9902c762df7a8733510a8 (patch) | |
tree | 43199954cc71aa822c1d0fb2b73fda2edf411e60 /libavformat/yuv4mpegenc.c | |
parent | 57fa9e97424de601a5f10ad7bfc6ce48597c783f (diff) | |
parent | 650d384048ed42579cc6d67bf32a94b468c0b6cb (diff) |
Merge commit '650d384048ed42579cc6d67bf32a94b468c0b6cb'
* commit '650d384048ed42579cc6d67bf32a94b468c0b6cb':
yuv4mpegenc: do not access AVCodecContext.coded_frame
Conflicts:
libavformat/yuv4mpegenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/yuv4mpegenc.c')
-rw-r--r-- | libavformat/yuv4mpegenc.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/libavformat/yuv4mpegenc.c b/libavformat/yuv4mpegenc.c index beae8bba65..a7f2d8ae9b 100644 --- a/libavformat/yuv4mpegenc.c +++ b/libavformat/yuv4mpegenc.c @@ -48,15 +48,12 @@ static int yuv4_generate_header(AVFormatContext *s, char* buf) if (aspectn == 0 && aspectd == 1) aspectd = 0; // 0:0 means unknown - inter = 'p'; /* progressive is the default */ - if (st->codec->coded_frame && st->codec->coded_frame->interlaced_frame) - inter = st->codec->coded_frame->top_field_first ? 't' : 'b'; - if (st->codec->field_order == AV_FIELD_PROGRESSIVE) { - inter = 'p'; - } else if (st->codec->field_order == AV_FIELD_TB || st->codec->field_order == AV_FIELD_TT) { - inter = 't'; - } else if (st->codec->field_order == AV_FIELD_BT || st->codec->field_order == AV_FIELD_BB) { - inter = 'b'; + switch (st->codec->field_order) { + case AV_FIELD_TB: + case AV_FIELD_TT: inter = 't'; break; + case AV_FIELD_BT: + case AV_FIELD_BB: inter = 'b'; break; + default: inter = 'p'; break; } switch (st->codec->pix_fmt) { |