Commit 357ec71f authored by Baptiste Coudurier's avatar Baptiste Coudurier

change pic type to Picture* and remove casts

Originally committed as revision 18833 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent c1ec75b5
...@@ -869,7 +869,7 @@ static void update_noise_reduction(MpegEncContext *s){ ...@@ -869,7 +869,7 @@ static void update_noise_reduction(MpegEncContext *s){
int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
{ {
int i; int i;
AVFrame *pic; Picture *pic;
s->mb_skipped = 0; s->mb_skipped = 0;
assert(s->last_picture_ptr==NULL || s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3); assert(s->last_picture_ptr==NULL || s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3);
...@@ -901,10 +901,10 @@ alloc: ...@@ -901,10 +901,10 @@ alloc:
} }
if(s->current_picture_ptr && s->current_picture_ptr->data[0]==NULL) if(s->current_picture_ptr && s->current_picture_ptr->data[0]==NULL)
pic= (AVFrame*)s->current_picture_ptr; //we already have a unused image (maybe it was set before reading the header) pic= s->current_picture_ptr; //we already have a unused image (maybe it was set before reading the header)
else{ else{
i= ff_find_unused_picture(s, 0); i= ff_find_unused_picture(s, 0);
pic= (AVFrame*)&s->picture[i]; pic= &s->picture[i];
} }
pic->reference= 0; pic->reference= 0;
...@@ -917,10 +917,10 @@ alloc: ...@@ -917,10 +917,10 @@ alloc:
pic->coded_picture_number= s->coded_picture_number++; pic->coded_picture_number= s->coded_picture_number++;
if( alloc_picture(s, (Picture*)pic, 0) < 0) if(alloc_picture(s, pic, 0) < 0)
return -1; return -1;
s->current_picture_ptr= (Picture*)pic; s->current_picture_ptr= pic;
s->current_picture_ptr->top_field_first= s->top_field_first; //FIXME use only the vars from current_pic s->current_picture_ptr->top_field_first= s->top_field_first; //FIXME use only the vars from current_pic
s->current_picture_ptr->interlaced_frame= !s->progressive_frame && !s->progressive_sequence; s->current_picture_ptr->interlaced_frame= !s->progressive_frame && !s->progressive_sequence;
} }
......
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