Replace AVFrame pointer casts by proper struct member accesses.

This commit is contained in:
Diego Biurrun
2012-02-27 22:02:45 +01:00
parent 562b6c744a
commit 47c0ac96aa
8 changed files with 67 additions and 51 deletions

View File

@@ -974,7 +974,7 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg)
if (i < 0)
return i;
pic = (AVFrame *) &s->picture[i];
pic = &s->picture[i].f;
pic->reference = 3;
for (i = 0; i < 4; i++) {
@@ -989,7 +989,7 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg)
if (i < 0)
return i;
pic = (AVFrame *) &s->picture[i];
pic = &s->picture[i].f;
pic->reference = 3;
if (ff_alloc_picture(s, (Picture *) pic, 0) < 0) {
@@ -1241,7 +1241,7 @@ static int select_input_picture(MpegEncContext *s)
s->input_picture[0]->f.type == FF_BUFFER_TYPE_INTERNAL);
s->avctx->release_buffer(s->avctx,
(AVFrame *) s->input_picture[0]);
&s->input_picture[0]->f);
}
emms_c();
@@ -1374,13 +1374,13 @@ no_output_pic:
/* mark us unused / free shared pic */
if (s->reordered_input_picture[0]->f.type == FF_BUFFER_TYPE_INTERNAL)
s->avctx->release_buffer(s->avctx,
(AVFrame *) s->reordered_input_picture[0]);
&s->reordered_input_picture[0]->f);
for (i = 0; i < 4; i++)
s->reordered_input_picture[0]->f.data[i] = NULL;
s->reordered_input_picture[0]->f.type = 0;
copy_picture_attributes(s, (AVFrame *) pic,
(AVFrame *) s->reordered_input_picture[0]);
copy_picture_attributes(s, &pic->f,
&s->reordered_input_picture[0]->f);
s->current_picture_ptr = pic;
} else {