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/cavsdec.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libavcodec/cavsdec.c') diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index a9e4d37c2a..b2e221d627 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -476,8 +476,8 @@ static int decode_pic(AVSContext *h) { return -1; } /* make sure we have the reference frames we need */ - if(!h->DPB[0].data[0] || - (!h->DPB[1].data[0] && h->pic_type == AV_PICTURE_TYPE_B)) + if(!h->DPB[0].f.data[0] || + (!h->DPB[1].f.data[0] && h->pic_type == AV_PICTURE_TYPE_B)) return -1; } else { h->pic_type = AV_PICTURE_TYPE_I; @@ -494,7 +494,7 @@ static int decode_pic(AVSContext *h) { skip_bits(&s->gb,1); //marker_bit } /* release last B frame */ - if(h->picture.data[0]) + if(h->picture.f.data[0]) s->avctx->release_buffer(s->avctx, (AVFrame *)&h->picture); s->avctx->get_buffer(s->avctx, (AVFrame *)&h->picture); @@ -585,7 +585,7 @@ static int decode_pic(AVSContext *h) { } while(ff_cavs_next_mb(h)); } if(h->pic_type != AV_PICTURE_TYPE_B) { - if(h->DPB[1].data[0]) + if(h->DPB[1].f.data[0]) s->avctx->release_buffer(s->avctx, (AVFrame *)&h->DPB[1]); h->DPB[1] = h->DPB[0]; h->DPB[0] = h->picture; @@ -648,7 +648,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size, s->avctx = avctx; if (buf_size == 0) { - if(!s->low_delay && h->DPB[0].data[0]) { + if (!s->low_delay && h->DPB[0].f.data[0]) { *data_size = sizeof(AVPicture); *picture = *(AVFrame *) &h->DPB[0]; } @@ -669,9 +669,9 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size, break; case PIC_I_START_CODE: if(!h->got_keyframe) { - if(h->DPB[0].data[0]) + if(h->DPB[0].f.data[0]) avctx->release_buffer(avctx, (AVFrame *)&h->DPB[0]); - if(h->DPB[1].data[0]) + if(h->DPB[1].f.data[0]) avctx->release_buffer(avctx, (AVFrame *)&h->DPB[1]); h->got_keyframe = 1; } @@ -685,7 +685,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size, break; *data_size = sizeof(AVPicture); if(h->pic_type != AV_PICTURE_TYPE_B) { - if(h->DPB[1].data[0]) { + if(h->DPB[1].f.data[0]) { *picture = *(AVFrame *) &h->DPB[1]; } else { *data_size = 0; -- cgit v1.2.3