[vlc-commits] hds: Ignore sentinel value at the end of the fragment table

Antti Ajanki git at videolan.org
Tue Oct 7 15:49:53 CEST 2014


vlc | branch: master | Antti Ajanki <antti.ajanki at iki.fi> | Mon Oct  6 16:12:57 2014 +0000| [eb1c0924ad39f95a4f5e1edf06807be924a5bf67] | committer: Tristan Matthews

hds: Ignore sentinel value at the end of the fragment table

generate_new_chunk() never proceeds to the last fragment run if the
sentinel is included.

Signed-off-by: Tristan Matthews <tmatth at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eb1c0924ad39f95a4f5e1edf06807be924a5bf67
---

 modules/stream_filter/hds/hds.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c
index ff7d7a6..1831d71 100644
--- a/modules/stream_filter/hds/hds.c
+++ b/modules/stream_filter/hds/hds.c
@@ -430,6 +430,15 @@ static uint8_t* parse_afrt( vlc_object_t* p_this,
         s->fragment_run_count++;
     }
 
+    if ( s->fragment_runs[s->fragment_run_count-1].fragment_number_start == 0 &&
+         s->fragment_runs[s->fragment_run_count-1].fragment_timestamp == 0 &&
+         s->fragment_runs[s->fragment_run_count-1].fragment_duration == 0 &&
+         s->fragment_runs[s->fragment_run_count-1].discont == 0 )
+    {
+        /* ignore sentinel value */
+        s->fragment_run_count--;
+    }
+
     return data_p;
 }
 



More information about the vlc-commits mailing list