summaryrefslogtreecommitdiff
path: root/libavcodec/hevc_parser.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-04-29 22:01:03 -0300
committerJames Almer <jamrial@gmail.com>2017-05-05 17:30:35 -0300
commitc4b08c8a4e54b752641d0792d9a73e16e62a0bbc (patch)
tree58145bd7ee6aea2d76ed1daf87d2c188e0007071 /libavcodec/hevc_parser.c
parentf52fbf4f3ed02a7d872d8a102006f29b4421f360 (diff)
avcodec/hevcdec: remove HEVCContext usage from hevc_sei
Based on the H264 SEI implementation. Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Reviewed-by: Aaron Levinson <alevinsn@aracnet.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/hevc_parser.c')
-rw-r--r--libavcodec/hevc_parser.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c
index 310428d0ff..f82f9fdf5e 100644
--- a/libavcodec/hevc_parser.c
+++ b/libavcodec/hevc_parser.c
@@ -192,6 +192,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf,
GetBitContext *gb;
SliceHeader *sh = &h->sh;
HEVCParamSets *ps = &h->ps;
+ HEVCSEIContext *sei = &h->sei;
H2645Packet *pkt = &ctx->pkt;
const uint8_t *buf_end = buf + buf_size;
int state = -1, i;
@@ -212,7 +213,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf,
h->avctx = avctx;
- ff_hevc_reset_sei(h);
+ ff_hevc_reset_sei(sei);
if (!buf_size)
return 0;
@@ -265,7 +266,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf,
break;
case HEVC_NAL_SEI_PREFIX:
case HEVC_NAL_SEI_SUFFIX:
- ff_hevc_decode_nal_sei(h);
+ ff_hevc_decode_nal_sei(gb, avctx, sei, ps, h->nal_unit_type);
break;
case HEVC_NAL_TRAIL_N:
case HEVC_NAL_TRAIL_R:
@@ -290,8 +291,8 @@ static inline int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf,
}
sh->first_slice_in_pic_flag = get_bits1(gb);
- s->picture_structure = h->picture_struct;
- s->field_order = h->picture_struct;
+ s->picture_structure = h->sei.picture_timing.picture_struct;
+ s->field_order = h->sei.picture_timing.picture_struct;
if (IS_IRAP(h)) {
s->key_frame = 1;