# HG changeset patch # User reimar # Date 1289411351 0 # Node ID 48ee2c1512516ad43b6c8e004d89208b3a6fe651 # Parent 4157eca9694732683af84f13f5076bfd5863e9ea 100l, add forgotten FFMIN to fix small reads (-nocache) with bd:// protocol. diff -r 4157eca96947 -r 48ee2c151251 stream/stream_bd.c --- 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;