[MPlayer-cvslog] r32618 - trunk/stream/stream_bd.c

reimar subversion at mplayerhq.hu
Wed Nov 10 18:49:11 CET 2010


Author: reimar
Date: Wed Nov 10 18:49:11 2010
New Revision: 32618

Log:
100l, add forgotten FFMIN to fix small reads (-nocache) with bd:// protocol.

Modified:
   trunk/stream/stream_bd.c

Modified: trunk/stream/stream_bd.c
==============================================================================
--- trunk/stream/stream_bd.c	Wed Nov 10 18:43:48 2010	(r32617)
+++ trunk/stream/stream_bd.c	Wed Nov 10 18:49:11 2010	(r32618)
@@ -286,7 +286,7 @@ static off_t bd_read(struct bd_priv *bd,
         return -1;
 
     if (unit_offset) {
-        int decrypt_len = BD_UNIT_SIZE - unit_offset;
+        int decrypt_len = FFMIN(len, BD_UNIT_SIZE - unit_offset);
         av_aes_crypt(bd->aescbc, buf, buf, decrypt_len / 16, bd->iv.u8, 1);
         buf += decrypt_len;
         len -= decrypt_len;


More information about the MPlayer-cvslog mailing list