diff options
author | ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-14 15:39:46 +0000 |
---|---|---|
committer | ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-14 15:39:46 +0000 |
commit | a91bdbc2a80dea621f6f86b329a9a7e651ba60ee (patch) | |
tree | e9ebbac8daf83f0299749ae3c06d75f299d2f7b9 /stream | |
parent | e9c921bbe153aa6156d00c1fd9a5921997497274 (diff) | |
download | mpv-a91bdbc2a80dea621f6f86b329a9a7e651ba60ee.tar.bz2 mpv-a91bdbc2a80dea621f6f86b329a9a7e651ba60ee.tar.xz |
Only print one track info when exactly seeking to the beginning of a track.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25393 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream_cdda.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c index cf575d35a4..2ce621edef 100644 --- a/stream/stream_cdda.c +++ b/stream/stream_cdda.c @@ -328,6 +328,7 @@ static int seek(stream_t* s,off_t newpos) { cd_track_t *cd_track; int sec; int current_track=0, seeked_track=0; + int seek_to_track = 0; int i; s->pos = newpos; @@ -347,10 +348,11 @@ static int seek(stream_t* s,off_t newpos) { } if( sec>=p->cd->disc_toc[i].dwStartSector && sec<p->cd->disc_toc[i+1].dwStartSector ) { seeked_track = i; + seek_to_track = sec == p->cd->disc_toc[i].dwStartSector; } } //printf("current: %d, seeked: %d\n", current_track, seeked_track); - if( current_track!=seeked_track ) { + if (current_track != seeked_track && !seek_to_track) { //printf("Track %d, sector=%d\n", seeked_track, sec); cd_track = cd_info_get_track(p->cd_info, seeked_track+1); if( cd_track!=NULL ) { |