[FFmpeg-cvslog] dashdec: Avoid trying to read any segments beyond the last

sfan5 git at videolan.org
Sun Jan 14 17:03:55 EET 2018


ffmpeg | branch: master | sfan5 <sfan5 at live.de> | Sun Jan 14 23:01:45 2018 +0800| [01d74c405564bb4846bf894bb928ae542273cfe8] | committer: Steven Liu

dashdec: Avoid trying to read any segments beyond the last

Signed-off-by: Steven Liu <lq at chinaffmpeg.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=01d74c405564bb4846bf894bb928ae542273cfe8
---

 libavformat/dashdec.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 05b6021474..2427ad059e 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;



More information about the ffmpeg-cvslog mailing list