From 324deaa26883efbdac3b82d4b06eee0285826a7f Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Mon, 27 Feb 2012 22:08:41 +0100 Subject: Replace AVFrame pointer type punning by proper struct member assignments. --- libavcodec/h264.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) (limited to 'libavcodec/h264.c') diff --git a/libavcodec/h264.c b/libavcodec/h264.c index afa9c27..36a4e2b 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -361,26 +361,14 @@ static void await_references(H264Context *h){ nrefs[list]--; if(!FIELD_PICTURE && ref_field_picture){ // frame referencing two fields - ff_thread_await_progress(&ref_pic->f, - FFMIN((row >> 1) - !(row & 1), - pic_height - 1), - 1); - ff_thread_await_progress(&ref_pic->f, - FFMIN((row >> 1), pic_height - 1), - 0); + ff_thread_await_progress(&ref_pic->f, FFMIN((row >> 1) - !(row & 1), pic_height - 1), 1); + ff_thread_await_progress(&ref_pic->f, FFMIN((row >> 1), pic_height - 1), 0); }else if(FIELD_PICTURE && !ref_field_picture){ // field referencing one field of a frame - ff_thread_await_progress(&ref_pic->f, - FFMIN(row * 2 + ref_field, - pic_height - 1), - 0); + ff_thread_await_progress(&ref_pic->f, FFMIN(row * 2 + ref_field, pic_height - 1), 0); }else if(FIELD_PICTURE){ - ff_thread_await_progress(&ref_pic->f, - FFMIN(row, pic_height - 1), - ref_field); + ff_thread_await_progress(&ref_pic->f, FFMIN(row, pic_height - 1), ref_field); }else{ - ff_thread_await_progress(&ref_pic->f, - FFMIN(row, pic_height - 1), - 0); + ff_thread_await_progress(&ref_pic->f, FFMIN(row, pic_height - 1), 0); } } } @@ -4053,7 +4041,7 @@ static int decode_frame(AVCodecContext *avctx, if(out){ *data_size = sizeof(AVFrame); - *pict= *(AVFrame*)out; + *pict = out->f; } return buf_index; @@ -4087,7 +4075,7 @@ static int decode_frame(AVCodecContext *avctx, } else { *data_size = sizeof(AVFrame); - *pict = *(AVFrame*)h->next_output_pic; + *pict = h->next_output_pic->f; } } -- cgit v1.1