[vlc-commits] demux: stl: fail on empty or broken seek
Francois Cartegnie
git at videolan.org
Wed Jan 25 21:30:52 CET 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jan 25 21:21:15 2017 +0100| [fae8987643cc51fb05b924753d16b7e6273a9332] | committer: Francois Cartegnie
demux: stl: fail on empty or broken seek
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fae8987643cc51fb05b924753d16b7e6273a9332
---
modules/demux/stl.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/demux/stl.c b/modules/demux/stl.c
index da0d998..858dfc7 100644
--- a/modules/demux/stl.c
+++ b/modules/demux/stl.c
@@ -215,8 +215,13 @@ static int Open(vlc_object_t *object)
if (ebn == 0xff && sys->count < tti_count)
s->count = 0;
}
- if (sys->count > 0)
- vlc_stream_Seek(demux->s, 1024 + 128LL * sys->index[0].index);
+
+ if (sys->count == 0 ||
+ vlc_stream_Seek(demux->s, 1024 + 128LL * sys->index[0].index) != VLC_SUCCESS)
+ {
+ Close(object);
+ return VLC_EGENERIC;
+ }
es_format_t fmt;
es_format_Init(&fmt, SPU_ES, VLC_CODEC_EBU_STL);
More information about the vlc-commits
mailing list