summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2018-01-14 23:01:45 +0800
committerSteven Liu <lq@chinaffmpeg.org>2018-01-14 23:01:45 +0800
commit01d74c405564bb4846bf894bb928ae542273cfe8 (patch)
treea31c765426346eac96fff4abcaa2025a34a87a9d
parent74b143d81fa38cd4f05a0db889a19a2cb7ff226c (diff)
downloadffmpeg-streaming-01d74c405564bb4846bf894bb928ae542273cfe8.zip
ffmpeg-streaming-01d74c405564bb4846bf894bb928ae542273cfe8.tar.gz
dashdec: Avoid trying to read any segments beyond the last
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
-rw-r--r--libavformat/dashdec.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 05b6021..2427ad0 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -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;
OpenPOWER on IntegriCloud