summaryrefslogtreecommitdiff
path: root/libavcodec/cavsdec.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2011-07-06 20:08:30 +0200
committerDiego Biurrun <diego@biurrun.de>2011-07-11 00:19:00 +0200
commit657ccb5ac75ce34e62bd67f228d9bd36db72189e (patch)
treee490b0d6b4ff93490f70d4f67a0551dd187147e3 /libavcodec/cavsdec.c
parent142e76f1055de5dde44696e71a5f63f2cb11dedf (diff)
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.
Diffstat (limited to 'libavcodec/cavsdec.c')
-rw-r--r--libavcodec/cavsdec.c16
1 files changed, 8 insertions, 8 deletions
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;