mirror of
https://github.com/mpv-player/mpv
synced 2025-01-01 20:32:13 +00:00
use demux_flush() where appropriate
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26959 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e14b550cf6
commit
02c779f1cf
@ -158,9 +158,7 @@ static float read_first_mpeg_pts_at_position(demuxer_t* demuxer, off_t stream_po
|
||||
if(found == 3) pts = found_pts3;
|
||||
|
||||
//clean up from searching of first pts;
|
||||
ds_free_packs(demuxer->audio);
|
||||
ds_free_packs(demuxer->video);
|
||||
ds_free_packs(demuxer->sub);
|
||||
demux_flush(demuxer);
|
||||
|
||||
return pts;
|
||||
}
|
||||
@ -981,9 +979,7 @@ void demux_seek_mpg(demuxer_t *demuxer,float rel_seek_secs,float audio_delay, in
|
||||
//prepare another seek because we are off by more than 0.5s
|
||||
if(mpg_d) {
|
||||
newpos += (newpts - mpg_d->last_pts) * (newpos - oldpos) / (mpg_d->last_pts - oldpts);
|
||||
ds_free_packs(d_audio);
|
||||
ds_free_packs(d_video);
|
||||
ds_free_packs(demuxer->sub);
|
||||
demux_flush(demuxer);
|
||||
demuxer->stream->eof=0; // clear eof flag
|
||||
d_video->eof=0;
|
||||
d_audio->eof=0;
|
||||
|
Loading…
Reference in New Issue
Block a user