Package: amule
Version: 2.2.1-1
Severity: normal
Tags: patch

   When selecting "Try to download first and last chunks first" in the
preferences, aMule ensures that at least 3 MB of data is downloaded at
the end of the file. This is not enough for previewing most AVI files,
as the index size is closer to 12 MB for a typical 2-hour movie.

   The attached patch ensures that aMule downloads at least 14 MB of
data at the end of AVI files.

-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.28 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages amule depends on:
ii  amule-common           2.2.1-1           common files for the rest of aMule
ii  libc6                  2.9-0exp1         GNU C Library: Shared libraries
ii  libcrypto++7           5.5.2-2           General purpose cryptographic shar
ii  libgcc1                1:4.3.2-1.1       GCC support library
ii  libgeoip1              1.4.4.dfsg-3      A non-DNS IP-to-country resolver l
ii  libstdc++6             4.3.2-1.1         The GNU Standard C++ Library v3
ii  libupnp3               1:1.6.6-3         Portable SDK for UPnP Devices (sha
ii  libwxbase2.8-0         2.8.7.1-1.1       wxBase library (runtime) - non-GUI
ii  libwxgtk2.8-0          2.8.7.1-1.1       wxWidgets Cross-platform C++ GUI t
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

Versions of packages amule recommends:
ii  amule-utils                   2.2.1-1    utilities for aMule (command-line 

Versions of packages amule suggests:
pn  amule-utils-gui               <none>     (no description available)

-- no debconf information
--- amule-2.2.1/src/PartFile.cpp.old	2009-01-18 04:10:13.000000000 +0100
+++ amule-2.2.1/src/PartFile.cpp	2009-01-18 04:14:11.000000000 +0100
@@ -2055,10 +2055,12 @@ bool CPartFile::GetNextRequestedBlock(CU
 						} else if(cur_chunk.part == partCount-1) {
 							critPreview = true; // Last chunk
 						} else if(cur_chunk.part == partCount-2) {
-							// Last chunk - 1 (only if last chunk is too small)
+							critPreview = true; // Next to last chunk
+						} else if(cur_chunk.part == partCount-3) {
+							// Last chunk - 2 (only if last chunk is too small)
 							const uint32 sizeOfLastChunk = GetFileSize() - uEnd;
-							if(sizeOfLastChunk < PARTSIZE/3) {
-								critPreview = true; // Last chunk - 1
+							if(sizeOfLastChunk < PARTSIZE/2) {
+								critPreview = true; // Last chunk - 2
 							}
 						}
 					}

Reply via email to