summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-02-27 22:08:41 +0100
committerDiego Biurrun <diego@biurrun.de>2012-03-01 23:11:13 +0100
commit324deaa26883efbdac3b82d4b06eee0285826a7f (patch)
treefc9531cb91ac14c2135050c7020d0f03d2fcafa2 /libavcodec/h264.c
parent47c0ac96aa3530aad9fbc5250a531589f251d4d7 (diff)
downloadffmpeg-streaming-324deaa26883efbdac3b82d4b06eee0285826a7f.zip
ffmpeg-streaming-324deaa26883efbdac3b82d4b06eee0285826a7f.tar.gz
Replace AVFrame pointer type punning by proper struct member assignments.
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c26
1 files changed, 7 insertions, 19 deletions
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;
}
}
OpenPOWER on IntegriCloud