diff options
author | 2008-12-28 23:05:59 +0000 | |
---|---|---|
committer | 2008-12-28 23:05:59 +0000 | |
commit | 9bdf9c8e2f315b4aeba47b05e5a0beccb279cdbc (patch) | |
tree | ff47e62b47d15b7552da1886cf9c840277eec616 /media-video | |
parent | Added app-portage/layman-1.2.2. (diff) | |
download | historical-9bdf9c8e2f315b4aeba47b05e5a0beccb279cdbc.tar.gz historical-9bdf9c8e2f315b4aeba47b05e5a0beccb279cdbc.tar.bz2 historical-9bdf9c8e2f315b4aeba47b05e5a0beccb279cdbc.zip |
Version bump, with patch from 249953
Package-Manager: portage-2.2_rc18/cvs/Linux 2.6.18-xenU-ec2-v1.0 i686
Diffstat (limited to 'media-video')
-rw-r--r-- | media-video/qt-faststart/ChangeLog | 8 | ||||
-rw-r--r-- | media-video/qt-faststart/Manifest | 4 | ||||
-rw-r--r-- | media-video/qt-faststart/files/qt-faststart-0.2.diff | 268 | ||||
-rw-r--r-- | media-video/qt-faststart/qt-faststart-0.2.ebuild | 36 |
4 files changed, 314 insertions, 2 deletions
diff --git a/media-video/qt-faststart/ChangeLog b/media-video/qt-faststart/ChangeLog index d1c4693846c7..92e3cedf2231 100644 --- a/media-video/qt-faststart/ChangeLog +++ b/media-video/qt-faststart/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-video/qt-faststart # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/qt-faststart/ChangeLog,v 1.2 2008/06/07 12:59:48 caleb Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/qt-faststart/ChangeLog,v 1.3 2008/12/28 23:05:59 caleb Exp $ + +*qt-faststart-0.2 (28 Dec 2008) + + 28 Dec 2008; Caleb Tennis <caleb@gentoo.org> +files/qt-faststart-0.2.diff, + +qt-faststart-0.2.ebuild: + version bump, with patch from 249953 07 Jun 2008; Caleb Tennis <caleb@gentoo.org> qt-faststart-0.1.ebuild: amd64 stable diff --git a/media-video/qt-faststart/Manifest b/media-video/qt-faststart/Manifest index 76d747842dbd..b0b411b70c71 100644 --- a/media-video/qt-faststart/Manifest +++ b/media-video/qt-faststart/Manifest @@ -1,4 +1,6 @@ +AUX qt-faststart-0.2.diff 8333 RMD160 bdc2b818c8e6b6458d641cb2ece2a591b2a578bb SHA1 f200e44e9c31a7da56187b2db4f2f39722adfa65 SHA256 0d54f2f85258a114668668bda8a36549c2ec5ea4569fcc835c9f8cbebe2df35a DIST ffmpeg-0.4.9-p20070616.tar.bz2 2275972 RMD160 73d0334b85f0859bbfc40a4d9c27fb987b36ca25 SHA1 6c649cf5b4c803bf7aec2f70adbd9d0992360e71 SHA256 bb15d2aee946ac6113928386f7385b15ffa4d9640e60830bd9868079bfb2da88 EBUILD qt-faststart-0.1.ebuild 724 RMD160 0b25cb750e3a5d733237331daaa3613c786b70a9 SHA1 d1a742715560c890dfef39fd22724c60a279cc8d SHA256 0a093a1dc5f7670944120b9ac3f5669a970fd8137ec0401852a80d5fca818233 -MISC ChangeLog 449 RMD160 dfe1ec37ddba4d5a027ed52ecc43a403b67fd16a SHA1 0663feafe638530ba584097b9a2a8600ec38413b SHA256 aed6323e9181baf96f565d6b69eacd1c32053108fad29e814330900bc55d6fa0 +EBUILD qt-faststart-0.2.ebuild 862 RMD160 3bfeca797f49c1f9f5b277645622c7aba522d500 SHA1 cc17623cf2036c3666d762336e1baa167d4ce861 SHA256 9ee627a898b7453b0a814e07b7f8621e59f66a6e067701b2f60bd3094b5cc6f5 +MISC ChangeLog 627 RMD160 d76b72cc972aa8e5fff60cb97d8af871b741af49 SHA1 3789149de5e6f186059261b37e16a853cd774e4e SHA256 c065bd4d65d74b1e514984aa3bc6abde6906ecb6db94f9e394c4ece70aa15bf7 MISC metadata.xml 253 RMD160 4e50c93f565251de34e9e3a11855049e27003980 SHA1 1749d68550fe9c9cfc589ed8698a0540f5398b83 SHA256 d1c9e3db952314c276bfa0f4bfecd9a44965d23b88e2796e377bb84694d373b4 diff --git a/media-video/qt-faststart/files/qt-faststart-0.2.diff b/media-video/qt-faststart/files/qt-faststart-0.2.diff new file mode 100644 index 000000000000..985917abdd4a --- /dev/null +++ b/media-video/qt-faststart/files/qt-faststart-0.2.diff @@ -0,0 +1,268 @@ +--- qt-faststart.c 2008-12-05 11:33:16 -0500 ++++ qt-faststart.c 2008-12-05 11:45:19 -0500 +@@ -1,9 +1,16 @@ + /* +- * qt-faststart.c, v0.1 ++ * qt-faststart.c, v0.2 ++ * + * by Mike Melanson (melanson@pcisys.net) + * This file is placed in the public domain. Use the program however you + * see fit. + * ++ * ChangLog ++ * 20081205 - Andrew Andkjar <andkjar@obtech.net> ++ * qt-faststart.c v0.2 - fixes for infinite loops caused by various malformed input files ++ * Pre 20081205 - Mike Melanson <melanson@pcisys.net> ++ * qt-faststart.c v0.1 - original version ++ * + * This utility rearranges a Quicktime file such that the moov atom + * is in front of the data, thus facilitating network streaming. + * +@@ -70,32 +77,32 @@ + + int main(int argc, char *argv[]) + { +- FILE *infile; +- FILE *outfile; ++ FILE *infile = NULL; ++ FILE *outfile = NULL; + unsigned char atom_bytes[ATOM_PREAMBLE_SIZE]; + uint32_t atom_type = 0; + uint64_t atom_size = 0; +- uint64_t last_offset; +- unsigned char *moov_atom; +- unsigned char *ftyp_atom = 0; +- uint64_t moov_atom_size; ++ uint64_t last_offset = 0; ++ unsigned char *moov_atom = NULL; ++ unsigned char *ftyp_atom = NULL; ++ uint64_t moov_atom_size = 0; + uint64_t ftyp_atom_size = 0; +- uint64_t i, j; +- uint32_t offset_count; +- uint64_t current_offset; ++ uint64_t i = 0, j = 0; ++ uint32_t offset_count = 0; ++ uint64_t current_offset = 0; + uint64_t start_offset = 0; + unsigned char copy_buffer[COPY_BUFFER_SIZE]; +- int bytes_to_copy; ++ int bytes_to_copy = 0; + + if (argc != 3) { +- printf ("Usage: qt-faststart <infile.mov> <outfile.mov>\n"); ++ fprintf(stderr, "Usage: qt-faststart <infile.mov> <outfile.mov>\n"); + return 0; + } + + infile = fopen(argv[1], "rb"); + if (!infile) { + perror(argv[1]); +- return 1; ++ goto error_out; + } + + /* traverse through the atoms in the file to make sure that 'moov' is +@@ -107,6 +114,11 @@ + atom_size = (uint32_t)BE_32(&atom_bytes[0]); + atom_type = BE_32(&atom_bytes[4]); + ++ if(atom_size < ATOM_PREAMBLE_SIZE) { ++ fprintf(stderr, "fatal error: bad atom size\n"); ++ goto error_out; ++ } ++ + if ((atom_type != FREE_ATOM) && + (atom_type != JUNK_ATOM) && + (atom_type != MDAT_ATOM) && +@@ -116,7 +128,7 @@ + (atom_type != WIDE_ATOM) && + (atom_type != PICT_ATOM) && + (atom_type != FTYP_ATOM)) { +- printf ("encountered non-QT top-level atom (is this a Quicktime file?)\n"); ++ fprintf(stderr, "encountered non-QT top-level atom (is this a Quicktime file?)\n"); + break; + } + +@@ -125,70 +137,82 @@ + ftyp_atom_size = atom_size; + ftyp_atom = malloc(ftyp_atom_size); + if (!ftyp_atom) { +- printf ("could not allocate 0x%llX byte for ftyp atom\n", +- atom_size); +- fclose(infile); +- return 1; ++ fprintf(stderr, "could not allocate 0x%llX byte for ftyp atom\n", atom_size); ++ goto error_out; + } +- fseeko(infile, -ATOM_PREAMBLE_SIZE, SEEK_CUR); ++ ++ if(0 != fseeko(infile, -ATOM_PREAMBLE_SIZE, SEEK_CUR)) { ++ perror(argv[1]); ++ goto error_out; ++ } ++ + if (fread(ftyp_atom, atom_size, 1, infile) != 1) { + perror(argv[1]); +- free(ftyp_atom); +- fclose(infile); +- return 1; ++ goto error_out; + } + start_offset = ftello(infile); ++ if(start_offset < 0) { ++ perror(argv[1]); ++ goto error_out; ++ } + continue; + } + + /* 64-bit special case */ + if (atom_size == 1) { + if (fread(atom_bytes, ATOM_PREAMBLE_SIZE, 1, infile) != 1) { +- break; ++ break; + } + atom_size = BE_64(&atom_bytes[0]); +- fseeko(infile, atom_size - ATOM_PREAMBLE_SIZE * 2, SEEK_CUR); ++ if(0 != fseeko(infile, atom_size - ATOM_PREAMBLE_SIZE * 2, SEEK_CUR)) { ++ perror(argv[1]); ++ goto error_out; ++ } + } else { +- fseeko(infile, atom_size - ATOM_PREAMBLE_SIZE, SEEK_CUR); ++ if(0 != fseeko(infile, atom_size - ATOM_PREAMBLE_SIZE, SEEK_CUR)) { ++ perror(argv[1]); ++ goto error_out; ++ } + } + } + + if (atom_type != MOOV_ATOM) { +- printf ("last atom in file was not a moov atom\n"); +- fclose(infile); +- return 0; ++ fprintf(stderr, "last atom in file was not a moov atom\n"); ++ goto error_out; + } + + /* moov atom was, in fact, the last atom in the chunk; load the whole + * moov atom */ +- fseeko(infile, -atom_size, SEEK_END); ++ if(0 != fseeko(infile, -atom_size, SEEK_END)) { ++ perror(argv[1]); ++ goto error_out; ++ } + last_offset = ftello(infile); ++ if(last_offset < 0) { ++ perror(argv[1]); ++ goto error_out; ++ } + moov_atom_size = atom_size; + moov_atom = malloc(moov_atom_size); + if (!moov_atom) { +- printf ("could not allocate 0x%llX byte for moov atom\n", +- atom_size); +- fclose(infile); +- return 1; ++ fprintf(stderr, "could not allocate 0x%llX byte for moov atom\n", atom_size); ++ goto error_out; + } + if (fread(moov_atom, atom_size, 1, infile) != 1) { + perror(argv[1]); +- free(moov_atom); +- fclose(infile); +- return 1; ++ goto error_out; + } + + /* this utility does not support compressed atoms yet, so disqualify + * files with compressed QT atoms */ + if (BE_32(&moov_atom[12]) == CMOV_ATOM) { +- printf ("this utility does not support compressed moov atoms yet\n"); +- free(moov_atom); +- fclose(infile); +- return 1; ++ fprintf(stderr, "this utility does not support compressed moov atoms yet\n"); ++ goto error_out; + } + + /* close; will be re-opened later */ + fclose(infile); ++ infile = NULL; + + /* crawl through the moov chunk in search of stco or co64 atoms */ + for (i = 4; i < moov_atom_size - 4; i++) { +@@ -198,8 +222,7 @@ + atom_size = BE_32(&moov_atom[i - 4]); + if (i + atom_size - 4 > moov_atom_size) { + printf (" bad atom size\n"); +- free(moov_atom); +- return 1; ++ goto error_out; + } + offset_count = BE_32(&moov_atom[i + 8]); + for (j = 0; j < offset_count; j++) { +@@ -216,8 +239,7 @@ + atom_size = BE_32(&moov_atom[i - 4]); + if (i + atom_size - 4 > moov_atom_size) { + printf (" bad atom size\n"); +- free(moov_atom); +- return 1; ++ goto error_out; + } + offset_count = BE_32(&moov_atom[i + 8]); + for (j = 0; j < offset_count; j++) { +@@ -240,21 +262,21 @@ + infile = fopen(argv[1], "rb"); + if (!infile) { + perror(argv[1]); +- free(moov_atom); +- return 1; ++ goto error_out; + } + + if (start_offset > 0) { /* seek after ftyp atom */ +- fseeko(infile, start_offset, SEEK_SET); ++ if(0 != fseeko(infile, start_offset, SEEK_SET)) { ++ perror(argv[1]); ++ goto error_out; ++ } + last_offset -= start_offset; + } + + outfile = fopen(argv[2], "wb"); + if (!outfile) { + perror(argv[2]); +- fclose(outfile); +- free(moov_atom); +- return 1; ++ goto error_out; + } + + /* dump the same ftyp atom */ +@@ -295,17 +317,16 @@ + + fclose(infile); + fclose(outfile); +- free(moov_atom); +- if (ftyp_atom_size > 0) +- free(ftyp_atom); +- ++ free(moov_atom); ++ free(ftyp_atom); + return 0; + + error_out: +- fclose(infile); +- fclose(outfile); ++ if(infile) ++ fclose(infile); ++ if(outfile) ++ fclose(outfile); + free(moov_atom); +- if (ftyp_atom_size > 0) +- free(ftyp_atom); ++ free(ftyp_atom); + return 1; + } diff --git a/media-video/qt-faststart/qt-faststart-0.2.ebuild b/media-video/qt-faststart/qt-faststart-0.2.ebuild new file mode 100644 index 000000000000..efcd7e5a51be --- /dev/null +++ b/media-video/qt-faststart/qt-faststart-0.2.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/qt-faststart/qt-faststart-0.2.ebuild,v 1.1 2008/12/28 23:05:59 caleb Exp $ + +inherit eutils + +DESCRIPTION="qt-faststart rearranges quicktime files to help with better network streaming" +HOMEPAGE="http://svn.mplayerhq.hu/ffmpeg/trunk/tools/qt-faststart.c" +SRC_URI="mirror://gentoo/ffmpeg-0.4.9-p20070616.tar.bz2" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +S="${WORKDIR}/ffmpeg" + + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/${P}.diff" || die "patch failed" +} + +src_compile() { + cd "${WORKDIR}/ffmpeg" + ./configure + make qt-faststart +} + +src_install() { + install -D -m 755 -o root -g root "${WORKDIR}/ffmpeg/qt-faststart" "${D}/usr/bin/qt-faststart" +} |