diff options
author | Timothy Gu <timothygu99@gmail.com> | 2016-08-03 15:41:59 -0700 |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2016-08-03 15:41:59 -0700 |
commit | bca30ed2b67f095fd31e07319a622ac30ad22978 (patch) | |
tree | ec957ba4fb48112765835398f34b96d23b815a1a /libavcodec/h264_refs.c | |
parent | 4be8ab70a628078a5c89e06157bc9f5cb071dda3 (diff) | |
parent | b13fc1e344011949929975a3451f78f226aa1de3 (diff) | |
download | ffmpeg-bca30ed2b67f095fd31e07319a622ac30ad22978.tar.gz |
Merge commit 'b13fc1e344011949929975a3451f78f226aa1de3'
* commit 'b13fc1e344011949929975a3451f78f226aa1de3':
h264: do not pass H264Context to h264_slice_header_parse()
Conflicts:
libavcodec/h264dec.h
Did not merge the h264_slice_header_parse() part. We use a few other
members of H264Context for error checking in that function.
Merged-by: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'libavcodec/h264_refs.c')
-rw-r--r-- | libavcodec/h264_refs.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index e760df1880..8011413d24 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -418,7 +418,7 @@ int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl) return 0; } -int ff_h264_decode_ref_pic_list_reordering(const H264Context *h, H264SliceContext *sl) +int ff_h264_decode_ref_pic_list_reordering(H264SliceContext *sl, void *logctx) { int list, index; @@ -436,10 +436,10 @@ int ff_h264_decode_ref_pic_list_reordering(const H264Context *h, H264SliceContex break; if (index >= sl->ref_count[list]) { - av_log(h->avctx, AV_LOG_ERROR, "reference count overflow\n"); + av_log(logctx, AV_LOG_ERROR, "reference count overflow\n"); return AVERROR_INVALIDDATA; } else if (op > 2) { - av_log(h->avctx, AV_LOG_ERROR, + av_log(logctx, AV_LOG_ERROR, "illegal modification_of_pic_nums_idc %u\n", op); return AVERROR_INVALIDDATA; @@ -821,14 +821,14 @@ int ff_h264_execute_ref_pic_marking(H264Context *h) return (h->avctx->err_recognition & AV_EF_EXPLODE) ? err : 0; } -int ff_h264_decode_ref_pic_marking(const H264Context *h, H264SliceContext *sl, - GetBitContext *gb) +int ff_h264_decode_ref_pic_marking(H264SliceContext *sl, GetBitContext *gb, + const H2645NAL *nal, void *logctx) { int i; MMCO *mmco = sl->mmco; int nb_mmco = 0; - if (h->nal_unit_type == H264_NAL_IDR_SLICE) { // FIXME fields + if (nal->type == H264_NAL_IDR_SLICE) { // FIXME fields skip_bits1(gb); // broken_link if (get_bits1(gb)) { mmco[0].opcode = MMCO_LONG; @@ -863,8 +863,8 @@ int ff_h264_decode_ref_pic_marking(const H264Context *h, H264SliceContext *sl, if (long_arg >= 32 || (long_arg >= 16 && !(opcode == MMCO_SET_MAX_LONG && long_arg == 16) && - !(opcode == MMCO_LONG2UNUSED && FIELD_PICTURE(h)))) { - av_log(h->avctx, AV_LOG_ERROR, + !(opcode == MMCO_LONG2UNUSED && FIELD_PICTURE(sl)))) { + av_log(logctx, AV_LOG_ERROR, "illegal long ref in memory management control " "operation %d\n", opcode); return -1; @@ -873,7 +873,7 @@ int ff_h264_decode_ref_pic_marking(const H264Context *h, H264SliceContext *sl, } if (opcode > (unsigned) MMCO_LONG) { - av_log(h->avctx, AV_LOG_ERROR, + av_log(logctx, AV_LOG_ERROR, "illegal memory management control operation %d\n", opcode); return -1; |