mirror of
https://github.com/mpv-player/mpv
synced 2025-01-04 14:12:10 +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;
|
if(found == 3) pts = found_pts3;
|
||||||
|
|
||||||
//clean up from searching of first pts;
|
//clean up from searching of first pts;
|
||||||
ds_free_packs(demuxer->audio);
|
demux_flush(demuxer);
|
||||||
ds_free_packs(demuxer->video);
|
|
||||||
ds_free_packs(demuxer->sub);
|
|
||||||
|
|
||||||
return pts;
|
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
|
//prepare another seek because we are off by more than 0.5s
|
||||||
if(mpg_d) {
|
if(mpg_d) {
|
||||||
newpos += (newpts - mpg_d->last_pts) * (newpos - oldpos) / (mpg_d->last_pts - oldpts);
|
newpos += (newpts - mpg_d->last_pts) * (newpos - oldpos) / (mpg_d->last_pts - oldpts);
|
||||||
ds_free_packs(d_audio);
|
demux_flush(demuxer);
|
||||||
ds_free_packs(d_video);
|
|
||||||
ds_free_packs(demuxer->sub);
|
|
||||||
demuxer->stream->eof=0; // clear eof flag
|
demuxer->stream->eof=0; // clear eof flag
|
||||||
d_video->eof=0;
|
d_video->eof=0;
|
||||||
d_audio->eof=0;
|
d_audio->eof=0;
|
||||||
|
Loading…
Reference in New Issue
Block a user