summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-21 23:07:57 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-21 23:07:57 +0200
commit75c394df8fc472c12e63c7677087517380313f0f (patch)
tree4a1b27ac9fcf2dc8e1c100b8494c530bb6260756 /libmpdemux
parentc0724413fda1152cf422c23f062ed4f4f4088c42 (diff)
downloadmpv-75c394df8fc472c12e63c7677087517380313f0f.tar.bz2
mpv-75c394df8fc472c12e63c7677087517380313f0f.tar.xz
demux_ty: fix "seek to negative position" warning
demux_ty relied on demuxer->filepos being initially set to 0, but demuxer.c has been changed to initialize it to -1. This caused a "Invalid seek to negative position!" error message when running the demux_ty file format check (so it occurred for any file which had not been recognized as another type before that). Fix by making demux_ty initialize filepos to 0.
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_ty.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libmpdemux/demux_ty.c b/libmpdemux/demux_ty.c
index 3120404d49..5d6958a970 100644
--- a/libmpdemux/demux_ty.c
+++ b/libmpdemux/demux_ty.c
@@ -851,6 +851,7 @@ static void demux_close_ty( demuxer_t *demux )
static int ty_check_file(demuxer_t* demuxer)
{
+ demuxer->filepos = 0;
TiVoInfo *tivo = calloc(1, sizeof(TiVoInfo));
demuxer->priv = tivo;
return ds_fill_buffer(demuxer->video) ? DEMUXER_TYPE_MPEG_TY : 0;