diff options
author | wm4 <wm4@nowhere> | 2013-06-16 22:07:48 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-06-16 22:07:48 +0200 |
commit | d81b71c7f7cb6f5b3a047fbfeeb41d4888e7c5b6 (patch) | |
tree | 0d50b238c1a798db9ef09838800c99653c06e408 /stream/stream_cdda.c | |
parent | 4d3a2c7e0dac38546f5fc2c7737a6ec1f09e30f6 (diff) | |
parent | f794444309a826478fefa00bf13d660793066b81 (diff) | |
download | mpv-d81b71c7f7cb6f5b3a047fbfeeb41d4888e7c5b6.tar.bz2 mpv-d81b71c7f7cb6f5b3a047fbfeeb41d4888e7c5b6.tar.xz |
Merge branch 'cache_new'
Diffstat (limited to 'stream/stream_cdda.c')
-rw-r--r-- | stream/stream_cdda.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c index a99150f65d..c19c71d64f 100644 --- a/stream/stream_cdda.c +++ b/stream/stream_cdda.c @@ -196,8 +196,10 @@ static int fill_buffer(stream_t *s, char *buffer, int max_len) int16_t *buf; int i; + if (max_len < CDIO_CD_FRAMESIZE_RAW) + return -1; + if ((p->sector < p->start_sector) || (p->sector > p->end_sector)) { - s->eof = 1; return 0; } @@ -234,7 +236,6 @@ static int seek(stream_t *s, int64_t newpos) s->pos = newpos; sec = s->pos / CDIO_CD_FRAMESIZE_RAW; if (s->pos < 0 || sec > p->end_sector) { - s->eof = 1; p->sector = p->end_sector + 1; return 0; } |