diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-02-04 13:44:26 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-02-04 13:44:39 +0100 |
commit | a0d5204cd990caf5ed0c6daa37f1b9e638009cad (patch) | |
tree | 65737e08f30606b9302770f540d6117783cc478c /libavcodec/hevc.c | |
parent | 8a3b85f3a7952c54a2c36ba1797f7e0cde9f85aa (diff) | |
parent | b25e84b7399bd91605596b67d761d3464dbe8a6e (diff) | |
download | ffmpeg-a0d5204cd990caf5ed0c6daa37f1b9e638009cad.tar.gz |
Merge commit 'b25e84b7399bd91605596b67d761d3464dbe8a6e'
* commit 'b25e84b7399bd91605596b67d761d3464dbe8a6e':
hevc: check that the VCL NAL types are the same for all slice segments of a frame
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r-- | libavcodec/hevc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index b067f52316..666a28cd8e 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2208,6 +2208,7 @@ static int hevc_frame_start(HEVCContext *s) lc->start_of_tiles_x = 0; s->is_decoded = 0; + s->first_nal_type = s->nal_unit_type; if (s->pps->tiles_enabled_flag) lc->end_of_tiles_x = s->pps->column_width[0] << s->sps->log2_ctb_size; @@ -2332,6 +2333,13 @@ static int decode_nal_unit(HEVCContext *s, const uint8_t *nal, int length) return AVERROR_INVALIDDATA; } + if (s->nal_unit_type != s->first_nal_type) { + av_log(s->avctx, AV_LOG_ERROR, + "Non-matching NAL types of the VCL NALUs: %d %d\n", + s->first_nal_type, s->nal_unit_type); + return AVERROR_INVALIDDATA; + } + if (!s->sh.dependent_slice_segment_flag && s->sh.slice_type != I_SLICE) { ret = ff_hevc_slice_rpl(s); |