dashdec: Avoid trying to read any segments beyond the last

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
sfan5 2018-01-14 23:01:45 +08:00 committed by Steven Liu
parent 74b143d81f
commit 01d74c4055
1 changed files with 5 additions and 3 deletions

View File

@ -1503,9 +1503,11 @@ restart:
if (ret > 0)
goto end;
if (!v->is_restart_needed)
v->cur_seq_no++;
v->is_restart_needed = 1;
if (c->is_live || v->cur_seq_no < v->last_seq_no) {
if (!v->is_restart_needed)
v->cur_seq_no++;
v->is_restart_needed = 1;
}
end:
return ret;