avcodec/hevc: make check for previous slice segment tighter

This ensures the previous one is matching the curent and not just any

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-02-07 16:31:11 +01:00
parent 7bb8b87654
commit 1a3ed056c5
1 changed files with 1 additions and 1 deletions

View File

@ -1918,7 +1918,7 @@ static int hls_decode_entry(AVCodecContext *avctxt, void *isFilterThread)
if (s->sh.dependent_slice_segment_flag) { if (s->sh.dependent_slice_segment_flag) {
int prev_rs = s->pps->ctb_addr_ts_to_rs[ctb_addr_ts - 1]; int prev_rs = s->pps->ctb_addr_ts_to_rs[ctb_addr_ts - 1];
if (s->tab_slice_address[prev_rs] == -1) { if (s->tab_slice_address[prev_rs] != s->sh.slice_addr) {
av_log(s->avctx, AV_LOG_ERROR, "Previous slice segment missing\n"); av_log(s->avctx, AV_LOG_ERROR, "Previous slice segment missing\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }