Commit f2336668 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '650d3840'

* commit '650d3840':
  yuv4mpegenc: do not access AVCodecContext.coded_frame

Conflicts:
	libavformat/yuv4mpegenc.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 57fa9e97 650d3840
...@@ -48,15 +48,12 @@ static int yuv4_generate_header(AVFormatContext *s, char* buf) ...@@ -48,15 +48,12 @@ static int yuv4_generate_header(AVFormatContext *s, char* buf)
if (aspectn == 0 && aspectd == 1) if (aspectn == 0 && aspectd == 1)
aspectd = 0; // 0:0 means unknown aspectd = 0; // 0:0 means unknown
inter = 'p'; /* progressive is the default */ switch (st->codec->field_order) {
if (st->codec->coded_frame && st->codec->coded_frame->interlaced_frame) case AV_FIELD_TB:
inter = st->codec->coded_frame->top_field_first ? 't' : 'b'; case AV_FIELD_TT: inter = 't'; break;
if (st->codec->field_order == AV_FIELD_PROGRESSIVE) { case AV_FIELD_BT:
inter = 'p'; case AV_FIELD_BB: inter = 'b'; break;
} else if (st->codec->field_order == AV_FIELD_TB || st->codec->field_order == AV_FIELD_TT) { default: inter = 'p'; break;
inter = 't';
} else if (st->codec->field_order == AV_FIELD_BT || st->codec->field_order == AV_FIELD_BB) {
inter = 'b';
} }
switch (st->codec->pix_fmt) { switch (st->codec->pix_fmt) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment