From 657ccb5ac75ce34e62bd67f228d9bd36db72189e Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 6 Jul 2011 20:08:30 +0200 Subject: Eliminate FF_COMMON_FRAME macro. FF_COMMON_FRAME holds the contents of the AVFrame structure and is also copied to struct Picture. Replace by an embedded AVFrame structure in struct Picture. --- libavcodec/mpeg12enc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libavcodec/mpeg12enc.c') diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index eb07ecf..31ac515 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -200,7 +200,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) if(aspect_ratio==0.0) aspect_ratio= 1.0; //pixel aspect 1:1 (VGA) - if (s->current_picture.key_frame) { + if (s->current_picture.f.key_frame) { AVRational framerate= ff_frame_rate_tab[s->frame_rate_index]; /* mpeg1 header repeated every gop */ @@ -287,9 +287,9 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) /* time code : we must convert from the real frame rate to a fake mpeg frame rate in case of low frame rate */ fps = (framerate.num + framerate.den/2)/ framerate.den; - time_code = s->current_picture_ptr->coded_picture_number + s->avctx->timecode_frame_start; + time_code = s->current_picture_ptr->f.coded_picture_number + s->avctx->timecode_frame_start; - s->gop_picture_number = s->current_picture_ptr->coded_picture_number; + s->gop_picture_number = s->current_picture_ptr->f.coded_picture_number; if (s->avctx->flags2 & CODEC_FLAG2_DROP_FRAME_TIMECODE) { /* only works for NTSC 29.97 */ int d = time_code / 17982; @@ -396,7 +396,7 @@ void mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) if (s->progressive_sequence) { put_bits(&s->pb, 1, 0); /* no repeat */ } else { - put_bits(&s->pb, 1, s->current_picture_ptr->top_field_first); + put_bits(&s->pb, 1, s->current_picture_ptr->f.top_field_first); } /* XXX: optimize the generation of this flag with entropy measures */ -- cgit v1.1