[vlc-commits] demux: stl: check for truncated blocks

Francois Cartegnie git at videolan.org
Sun Feb 12 18:46:13 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Feb 12 18:44:55 2017 +0100| [bd72ca7cdfaa2db109cf7f9edcdeecbdf100fc7a] | committer: Francois Cartegnie

demux: stl: check for truncated blocks

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

 modules/demux/stl.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/modules/demux/stl.c b/modules/demux/stl.c
index 74e1bbd..eec5754 100644
--- a/modules/demux/stl.c
+++ b/modules/demux/stl.c
@@ -194,13 +194,20 @@ static int Demux(demux_t *demux)
             return VLC_DEMUXER_EOF;
 
         block_t *b = vlc_stream_Block(demux->s, 128);
-        if (b){
+        if (b && b->i_buffer == 128)
+        {
             b->i_dts =
             b->i_pts = VLC_TS_0 + s->start;
             if (s->stop > s->start)
                 b->i_length = s->stop - s->start;
             es_out_Send(demux->out, sys->es, b);
         }
+        else
+        {
+            if(b)
+                block_Release(b);
+            return VLC_DEMUXER_EOF;
+        }
         sys->current++;
     }
 



More information about the vlc-commits mailing list