summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-11 10:28:49 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-11 10:28:49 +0200
commitd2d8e259fd2e5149546431b6c7d1cd3560b7ab97 (patch)
tree0dace1203dc7941216e613d0e4ff13e24a147b71 /libavcodec/h264.c
parent019eb2c77b7c315580200a5dbe6dabb1c97a3764 (diff)
parent5eb488bfa835f2902a31ba99d57c16ae36c4f598 (diff)
Merge commit '5eb488bfa835f2902a31ba99d57c16ae36c4f598'
* commit '5eb488bfa835f2902a31ba99d57c16ae36c4f598': h264: use explicit variable names for *_field_flag Conflicts: libavcodec/h264.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 94ab6163de..33aeaedf6b 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3212,6 +3212,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
int last_pic_structure, last_pic_droppable;
int must_reinit;
int needs_reinit = 0;
+ int field_pic_flag, bottom_field_flag;
h->me.qpel_put = h->h264qpel.put_h264_qpel_pixels_tab;
h->me.qpel_avg = h->h264qpel.avg_h264_qpel_pixels_tab;
@@ -3404,8 +3405,10 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
av_log(h->avctx, AV_LOG_ERROR, "This stream was generated by a broken encoder, invalid 8x8 inference\n");
return -1;
}
- if (get_bits1(&h->gb)) { // field_pic_flag
- h->picture_structure = PICT_TOP_FIELD + get_bits1(&h->gb); // bottom_field_flag
+ field_pic_flag = get_bits1(&h->gb);
+ if (field_pic_flag) {
+ bottom_field_flag = get_bits1(&h->gb);
+ h->picture_structure = PICT_TOP_FIELD + bottom_field_flag;
} else {
h->picture_structure = PICT_FRAME;
h->mb_aff_frame = h->sps.mb_aff;