1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-21 22:30:22 +00:00

demux_ts: fix -sb when -aid stream is not found

Make it seek back to the stream->start_pos position instead of 0 in
that case.
Fixes bug 1790.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32635 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-11-20 10:47:58 +00:00 committed by Uoti Urpala
parent 8ffe2c9afe
commit da15a4de00

View File

@ -1065,7 +1065,9 @@ static demuxer_t *demux_open_ts(demuxer_t * demuxer)
mp_msg(MSGT_DEMUXER,MSGL_V, "Opened TS demuxer, audio: %x(pid %d), video: %x(pid %d)...POS=%"PRIu64", PROBE=%"PRIu64"\n", params.atype, demuxer->audio->id, params.vtype, demuxer->video->id, (uint64_t) start_pos, ts_probe);
start_pos = (start_pos <= priv->ts.packet_size ? 0 : start_pos - priv->ts.packet_size);
start_pos = start_pos <= priv->ts.packet_size ?
demuxer->stream->start_pos :
start_pos - priv->ts.packet_size;
demuxer->movi_start = start_pos;
demuxer->reference_clock = MP_NOPTS_VALUE;
stream_reset(demuxer->stream);