diff options
author | Mickaƫl Raulet <mraulet@insa-rennes.fr> | 2014-07-25 16:37:39 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-26 02:01:04 +0200 |
commit | f6e218a02d6fa391f3c6b70aedaa2082c62acd95 (patch) | |
tree | 941c9e8e3009d92076a23b1a7d3f8701373d915e /libavcodec/hevc.c | |
parent | bd0f2d316faebfa1052b27421824c3f8dcbd78a8 (diff) | |
download | ffmpeg-f6e218a02d6fa391f3c6b70aedaa2082c62acd95.tar.gz |
hevc: fix RAP_B_Bossen
cherry picked from commit 903236292f066bc321080e3e2192b64f8943d960
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r-- | libavcodec/hevc.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 3f1c65b75d..af74034281 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -362,17 +362,6 @@ fail: return ret; } -static int is_sps_exist(HEVCContext *s, const HEVCSPS* last_sps) -{ - int i; - - for( i = 0; i < MAX_SPS_COUNT; i++) - if(s->sps_list[i]) - if (last_sps == (HEVCSPS*)s->sps_list[i]->data) - return 1; - return 0; -} - static int hls_slice_header(HEVCContext *s) { GetBitContext *gb = &s->HEVClc->gb; @@ -390,8 +379,6 @@ static int hls_slice_header(HEVCContext *s) sh->no_output_of_prior_pics_flag = 0; if (IS_IRAP(s)) sh->no_output_of_prior_pics_flag = get_bits1(gb); - if (s->nal_unit_type == NAL_CRA_NUT && s->last_eos == 1) - sh->no_output_of_prior_pics_flag = 1; sh->pps_id = get_ue_golomb_long(gb); if (sh->pps_id >= MAX_PPS_COUNT || !s->pps_list[sh->pps_id]) { @@ -404,16 +391,16 @@ static int hls_slice_header(HEVCContext *s) return AVERROR_INVALIDDATA; } s->pps = (HEVCPPS*)s->pps_list[sh->pps_id]->data; + if (s->nal_unit_type == NAL_CRA_NUT && s->last_eos == 1) + sh->no_output_of_prior_pics_flag = 1; if (s->sps != (HEVCSPS*)s->sps_list[s->pps->sps_id]->data) { const HEVCSPS* last_sps = s->sps; s->sps = (HEVCSPS*)s->sps_list[s->pps->sps_id]->data; - if (last_sps) { - if (is_sps_exist(s, last_sps)) { - if (s->sps->width != last_sps->width || s->sps->height != last_sps->height || - s->sps->temporal_layer[s->sps->max_sub_layers - 1].max_dec_pic_buffering != last_sps->temporal_layer[last_sps->max_sub_layers - 1].max_dec_pic_buffering) - sh->no_output_of_prior_pics_flag = 0; - } else + if (last_sps && IS_IRAP(s) && s->nal_unit_type != NAL_CRA_NUT) { + if (s->sps->width != last_sps->width || s->sps->height != last_sps->height || + s->sps->temporal_layer[s->sps->max_sub_layers - 1].max_dec_pic_buffering != + last_sps->temporal_layer[last_sps->max_sub_layers - 1].max_dec_pic_buffering) sh->no_output_of_prior_pics_flag = 0; } ff_hevc_clear_refs(s); |