[MPlayer-cvslog] r32581 - trunk/stream/stream_bd.c
reimar
subversion at mplayerhq.hu
Sat Nov 6 16:11:21 CET 2010
Author: reimar
Date: Sat Nov 6 16:11:21 2010
New Revision: 32581
Log:
Fix bd:// with -cache, the bd_read function does not work when
more than 1 sector is requested at once.
Modified:
trunk/stream/stream_bd.c
Modified: trunk/stream/stream_bd.c
==============================================================================
--- trunk/stream/stream_bd.c Sat Nov 6 15:57:44 2010 (r32580)
+++ trunk/stream/stream_bd.c Sat Nov 6 16:11:21 2010 (r32581)
@@ -276,6 +276,9 @@ static int bd_get_uks(struct bd_priv *bd
static off_t bd_read(struct bd_priv *bd, uint8_t *buf, int len)
{
int read_len;
+ // TODO: would be nicer if this function also worked for larger reads
+ int max_len = BD_UNIT_SIZE - (bd->pos % BD_UNIT_SIZE);
+ len = FFMIN(len, max_len);
len &= ~15;
if (!len)
return 0;
More information about the MPlayer-cvslog
mailing list