Mercurial > mplayer.hg
comparison mplayer.c @ 30378:8339bca8e4b4
Move the resync-related code into more consistent places instead of having it
scattered all over the place with half of it forgotten in some places.
author | reimar |
---|---|
date | Sun, 24 Jan 2010 15:16:39 +0000 |
parents | c74a5f8ffab3 |
children | c1a3f1bbba26 |
comparison
equal
deleted
inserted
replaced
30377:2eea1f09e2c5 | 30378:8339bca8e4b4 |
---|---|
2541 return -1; | 2541 return -1; |
2542 | 2542 |
2543 mpctx->startup_decode_retry = DEFAULT_STARTUP_DECODE_RETRY; | 2543 mpctx->startup_decode_retry = DEFAULT_STARTUP_DECODE_RETRY; |
2544 if (mpctx->sh_video) { | 2544 if (mpctx->sh_video) { |
2545 current_module = "seek_video_reset"; | 2545 current_module = "seek_video_reset"; |
2546 resync_video_stream(mpctx->sh_video); | |
2547 if (vo_config_count) | 2546 if (vo_config_count) |
2548 mpctx->video_out->control(VOCTRL_RESET, NULL); | 2547 mpctx->video_out->control(VOCTRL_RESET, NULL); |
2549 mpctx->sh_video->next_frame_time = 0; | |
2550 mpctx->sh_video->num_buffered_pts = 0; | |
2551 mpctx->sh_video->last_pts = MP_NOPTS_VALUE; | |
2552 mpctx->num_buffered_frames = 0; | 2548 mpctx->num_buffered_frames = 0; |
2553 mpctx->delay = 0; | 2549 mpctx->delay = 0; |
2554 mpctx->time_frame = 0; | 2550 mpctx->time_frame = 0; |
2555 // Not all demuxers set d_video->pts during seek, so this value | 2551 // Not all demuxers set d_video->pts during seek, so this value |
2556 // (which is used by at least vobsub and edl code below) may | 2552 // (which is used by at least vobsub and edl code below) may |
2561 } | 2557 } |
2562 | 2558 |
2563 if (mpctx->sh_audio) { | 2559 if (mpctx->sh_audio) { |
2564 current_module = "seek_audio_reset"; | 2560 current_module = "seek_audio_reset"; |
2565 mpctx->audio_out->reset(); // stop audio, throwing away buffered data | 2561 mpctx->audio_out->reset(); // stop audio, throwing away buffered data |
2566 mpctx->sh_audio->a_buffer_len = 0; | |
2567 mpctx->sh_audio->a_out_buffer_len = 0; | |
2568 if (!mpctx->sh_video) | 2562 if (!mpctx->sh_video) |
2569 update_subtitles(NULL, mpctx->sh_audio->pts, mpctx->d_sub, 1); | 2563 update_subtitles(NULL, mpctx->sh_audio->pts, mpctx->d_sub, 1); |
2570 } | 2564 } |
2571 | 2565 |
2572 if (vo_vobsub && mpctx->sh_video) { | 2566 if (vo_vobsub && mpctx->sh_video) { |