Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-24 14:04:18 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-05-24 14:15:56 +0400
commit029353e427dab092444008085ac330009a1707bd (patch)
tree8d2bbfcd2e955e8745c6b544f4e14730cbb98e1b /libavcodec/h264.c
parentcf6ed1f1293c2dd69b76d9246a916925b58b7bbf (diff)
parente9e5a1bdc769a7225ab0d4f8b33bcacc6496bd68 (diff)
Merge commit 'e9e5a1bdc769a7225ab0d4f8b33bcacc6496bd68'
* commit 'e9e5a1bdc769a7225ab0d4f8b33bcacc6496bd68': Monkey's Audio old versions FATE tests h264_parser: Set field_order and picture_structure. Conflicts: libavcodec/h264_parser.c tests/fate/lossless-audio.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 3d3746f003..efce095da0 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2694,11 +2694,10 @@ static void flush_dpb(AVCodecContext *avctx)
h->parse_context.last_index = 0;
}
-static int init_poc(H264Context *h)
+int ff_init_poc(H264Context *h, int pic_field_poc[2], int *pic_poc)
{
const int max_frame_num = 1 << h->sps.log2_max_frame_num;
int field_poc[2];
- Picture *cur = h->cur_pic_ptr;
h->frame_num_offset = h->prev_frame_num_offset;
if (h->frame_num < h->prev_frame_num)
@@ -2763,10 +2762,11 @@ static int init_poc(H264Context *h)
}
if (h->picture_structure != PICT_BOTTOM_FIELD)
- h->cur_pic_ptr->field_poc[0] = field_poc[0];
+ pic_field_poc[0] = field_poc[0];
if (h->picture_structure != PICT_TOP_FIELD)
- h->cur_pic_ptr->field_poc[1] = field_poc[1];
- cur->poc = FFMIN(cur->field_poc[0], cur->field_poc[1]);
+ pic_field_poc[1] = field_poc[1];
+ if (pic_poc)
+ *pic_poc = FFMIN(pic_field_poc[0], pic_field_poc[1]);
return 0;
}
@@ -3650,7 +3650,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
h->delta_poc[1] = get_se_golomb(&h->gb);
}
- init_poc(h);
+ ff_init_poc(h, h->cur_pic_ptr->field_poc, &h->cur_pic_ptr->poc);
if (h->pps.redundant_pic_cnt_present)
h->redundant_pic_count = get_ue_golomb(&h->gb);