1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-13 18:45:25 +00:00

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.
This commit is contained in:
Uoti Urpala 2011-01-21 23:07:57 +02:00
parent c0724413fd
commit 75c394df8f

View File

@ -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;