-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi
Attached the patch for the version I intend to upload. Please respond if you don't want this NMU to happen, if you are working yourself on a patch or if you think that the attached patch won't work. Cheers Luk - -- Luk Claes - http://people.debian.org/~luk - GPG key 1024D/9B7C328D Fingerprint: D5AF 25FB 316B 53BB 08E7 F999 E544 DE07 9B7C 328D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFDsYhG5UTeB5t8Mo0RAmrYAJ92RTRd6/xCiYaJg89xzdho1RGRHACeMV1l iqhsrj8LOFzcVW5uUvYzkyc= =yQqN -----END PGP SIGNATURE-----
diff -u checkmp3-1.98/mp3_check_misc.c checkmp3-1.98/mp3_check_misc.c --- checkmp3-1.98/mp3_check_misc.c +++ checkmp3-1.98/mp3_check_misc.c @@ -166,7 +166,7 @@ file_info.good_frame_count++; file_info.frame_sequence_count++; } else - printf("\nSomething happened at byte %d. Next expected frame: %d.\n", file_info.byte_count, file_info.next_expected_frame); + fprintf(stderr, "\nSomething happened at byte %d. Next expected frame: %d.\n", file_info.byte_count, file_info.next_expected_frame); // @@ -681,6 +681,7 @@ int counter = 0; int unk_char = 0; int actual_bytes_read = 0; + int pos_before_read; register char *data_frame; const int print_to_stdout = !flags->ssflag && (flags->sflag || flags->fflag); @@ -707,6 +708,7 @@ // I should check on this later... if (fp!=stdin && !print_to_stdout && !flags->iflag) { + pos_before_read = ftell(fp); if (mp3_i->PROT_BIT) { actual_bytes_read = fread (data_frame, sizeof(char), bytes_to_read, fp); @@ -736,7 +738,7 @@ //return(FAIL); } } else { - (void)fprintf(stderr,"File error while trying to read frame into memory.\n"); + fprintf(stderr,"At position %d: expected %d bytes, got %d bytes.%s\n", pos_before_read, bytes_to_read, actual_bytes_read, (feof(fp) ? " (EOF)" : "")); free(data_frame); return(FAIL); diff -u checkmp3-1.98/debian/changelog checkmp3-1.98/debian/changelog --- checkmp3-1.98/debian/changelog +++ checkmp3-1.98/debian/changelog @@ -1,3 +1,12 @@ +checkmp3 (1.98-5.1) unstable; urgency=low + + * Non-maintainer upload. + * Print error message to stderr (Closes: #243673, #343418). + * Add manpage for checkmp3 (Closes: #69143, #235326). + * Patch to make an error message more informative (Closes: #227313). + + -- Luk Claes <[EMAIL PROTECTED]> Tue, 27 Dec 2005 19:13:41 +0100 + checkmp3 (1.98-5) unstable; urgency=low * Changed executable name in help (closes: #184166). diff -u checkmp3-1.98/debian/rules checkmp3-1.98/debian/rules --- checkmp3-1.98/debian/rules +++ checkmp3-1.98/debian/rules @@ -56,7 +56,7 @@ # dh_installpam # dh_installinit dh_installcron - dh_installmanpages + dh_installman debian/checkmp3.1 dh_installinfo dh_undocumented -A dh_installchangelogs only in patch2: unchanged: --- checkmp3-1.98.orig/debian/checkmp3.1 +++ checkmp3-1.98/debian/checkmp3.1 @@ -0,0 +1,78 @@ +." Text automatically generated by txt2man-1.4.7 +.TH checkmp3 1 "February 28, 2004" "" +.SH NAME +\fBcheckmp3 \fP- identify MP3s that do not follow the MP3 format +.SH SYNOPSIS +.nf +.fam C +\fBcheckmp3\fP [-q \fInumber\fP] [-e] [-p] [-v[v]] [-a] [-b [\fIbyte_count\fP]] +[-i] [-s[s|f]] [-h] [\fIfile\fP] +.fam T +.fi +.SH DESCRIPTION +\fBcheckmp3\fP helps to identify in explicit detail MP3s that do not correctly +follow the MP3 format. It also looks for invalid frame headers, missing +frames, etc., and generates useful statistics. This can be useful when +building a high-quality mp3 archive\.\.\. +.SH OPTIONS +.TP +.B +-a +Checks the mp3 from stem to stern (default). If any other flags are present, it will not be enabled, and will instead behave as though the '-b' switch is present. +.TP +.B +-b [\fIbyte_count\fP] +If a frame is not found by \fIbyte_count\fP bytes, quit, and return an error. If \fIbyte_count\fP is not specified, it will search until the first valid frame and quit. +.TP +.B +-e +While id3v2 support is under development, this flag will allow you to have \fBcheckmp3\fP record a frame error when a id3v2 tag is found. +.TP +.B +-h +Print help including the version. +.TP +.B +-i +Check to see if there is a ID3 tag, and if so, display the info. +.TP +.B +-q \fInumber\fP +Determines the mininum \fInumber\fP of contiguous frames that must be present for an error NOT to occur. Analyzing random data will find spurious MP3 headers, but finding \fInumber\fP sequential headers are even harder to find. +.TP +.B +-p +Shows just the essentials (what you get without the -v option) on a single line for easy parsing. The fields are separated by tabs, and the name/value pairs are separated by spaces. +.TP +.B +-s[s|f] +Sends the mp3 to stdout (for CGI applications). If an additional 's' is there, then no output is made, just errors are reported (super silent). With the 'f' used, only valid frames are sent to stdout ('f'ixing the mp3 is attempted). Also, it is important to note that the id3 tag will not be included in the 'f'ixed mp3. If you want it included, you have to include the '-i' option. +.TP +.B +-v[v] +Lists details about the mp3 in name -> value order. Adding an extra 'v' at the end gives details about each frame. Extremly verbose! +.SH EXAMPLE +To check an mp3 run: +.PP +.nf +.fam C + $ checkmp3 file.mp3 + +.fam T +.fi +To fix a broken mp3 run: +.PP +.nf +.fam C + $ checkmp3 -sf file.mp3 > fixed-file.mp3 +.fam T +.fi +.SH BUGS +.IP \(bu 3 +There may be a problem with 'fixing' VBR files. Anyone else have any bad experiences? I guess mpg123 doesn't like it when \fBcheckmp3\fP fixed the VBR mp3, although I am inclined to think that it may be a problem with mpg123\.\.\. +.IP \(bu 3 +With a valid mp3 with no id3 tag, using the -a -sf flags will give you an identical mp3. However not using the -sf flag, but instead using the -s flag will give you a much smaller mp3 (This should be fixed). +.SH HOMEPAGE +http://sourceforge.net/project/?group_id=6126 +.SH AUTHOR +Eric Bullen <ericb at thedeepsky.com>