mirror of
https://github.com/mpv-player/mpv
synced 2025-01-13 10:26:09 +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:
parent
c0724413fd
commit
75c394df8f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user