diff stream/stream_bd.c @ 32531:48ee2c151251

100l, add forgotten FFMIN to fix small reads (-nocache) with bd:// protocol.
author reimar
date Wed, 10 Nov 2010 17:49:11 +0000
parents 4157eca96947
children a93891202051
line wrap: on
line diff
--- a/stream/stream_bd.c	Wed Nov 10 17:43:48 2010 +0000
+++ b/stream/stream_bd.c	Wed Nov 10 17:49:11 2010 +0000
@@ -286,7 +286,7 @@
         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;