diff options
author | Clément Bœsch <u@pkh.me> | 2017-04-26 17:25:54 +0200 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2017-04-26 17:25:54 +0200 |
commit | 84a368f6fec8a74d78a266785f3eeff3648827ba (patch) | |
tree | 86e032bb5f3fb18e59feaf98e4a835b6323d7f39 | |
parent | a0ffd66caaae1bff1abebffb36e135abcc8122e6 (diff) | |
parent | 373fd76b4dbd9aa03ed28e502f33f2ca8c1ce19a (diff) | |
download | ffmpeg-84a368f6fec8a74d78a266785f3eeff3648827ba.tar.gz |
Merge commit '373fd76b4dbd9aa03ed28e502f33f2ca8c1ce19a'
* commit '373fd76b4dbd9aa03ed28e502f33f2ca8c1ce19a':
hevcdec: do not set decoder-global SPS prematurely
Merged-by: Clément Bœsch <u@pkh.me>
-rw-r--r-- | libavcodec/hevcdec.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 0c620d40fa..b698c0bbc7 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -459,23 +459,23 @@ static int hls_slice_header(HEVCContext *s) sh->no_output_of_prior_pics_flag = 1; if (s->ps.sps != (HEVCSPS*)s->ps.sps_list[s->ps.pps->sps_id]->data) { - const HEVCSPS* last_sps = s->ps.sps; + const HEVCSPS *sps = (HEVCSPS*)s->ps.sps_list[s->ps.pps->sps_id]->data; + const HEVCSPS *last_sps = s->ps.sps; enum AVPixelFormat pix_fmt; - s->ps.sps = (HEVCSPS*)s->ps.sps_list[s->ps.pps->sps_id]->data; if (last_sps && IS_IRAP(s) && s->nal_unit_type != HEVC_NAL_CRA_NUT) { - if (s->ps.sps->width != last_sps->width || s->ps.sps->height != last_sps->height || - s->ps.sps->temporal_layer[s->ps.sps->max_sub_layers - 1].max_dec_pic_buffering != + if (sps->width != last_sps->width || sps->height != last_sps->height || + sps->temporal_layer[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); - pix_fmt = get_format(s, s->ps.sps); + pix_fmt = get_format(s, sps); if (pix_fmt < 0) return pix_fmt; - ret = set_sps(s, s->ps.sps, pix_fmt); + ret = set_sps(s, sps, pix_fmt); if (ret < 0) return ret; |