diff options
author | Diego Biurrun <diego@biurrun.de> | 2012-02-28 01:08:41 +0400 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2012-03-02 02:11:13 +0400 |
commit | 324deaa26883efbdac3b82d4b06eee0285826a7f (patch) | |
tree | fc9531cb91ac14c2135050c7020d0f03d2fcafa2 /libavcodec/h264.c | |
parent | 47c0ac96aa3530aad9fbc5250a531589f251d4d7 (diff) |
Replace AVFrame pointer type punning by proper struct member assignments.
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index afa9c2747d..36a4e2bb03 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; } } |