diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2006-11-19 17:22:56 +0000 |
---|---|---|
committer | Matthias Schwarzott <zzam@gentoo.org> | 2006-11-19 17:22:56 +0000 |
commit | 11588ae6c8724dd1dfc8fc15d1caeb9e659d824f (patch) | |
tree | f1c70b94532ddd5fce0c077c697bdd5218837162 /media-video/mjpegtools/files | |
parent | pkg_prerm should have been pkg_postrm; Fixes a problem where files from the p... (diff) | |
download | gentoo-2-11588ae6c8724dd1dfc8fc15d1caeb9e659d824f.tar.gz gentoo-2-11588ae6c8724dd1dfc8fc15d1caeb9e659d824f.tar.bz2 gentoo-2-11588ae6c8724dd1dfc8fc15d1caeb9e659d824f.zip |
Added fixes for various bugs (#152568, #128404 and #137530).
(Portage version: 2.1.2_rc2)
Diffstat (limited to 'media-video/mjpegtools/files')
3 files changed, 106 insertions, 0 deletions
diff --git a/media-video/mjpegtools/files/digest-mjpegtools-1.8.0-r2 b/media-video/mjpegtools/files/digest-mjpegtools-1.8.0-r2 new file mode 100644 index 000000000000..8846d158be9f --- /dev/null +++ b/media-video/mjpegtools/files/digest-mjpegtools-1.8.0-r2 @@ -0,0 +1,6 @@ +MD5 6fd98362310480bdaf7171e9659f165f mjpegtools-1.8.0.tar.gz 1475998 +RMD160 4d97a6a721f29223975605e2a5e645b4d7d129b5 mjpegtools-1.8.0.tar.gz 1475998 +SHA256 d841575c72cd0e587c1bab703d0906e3d23bf428424000557739cf5d6097209a mjpegtools-1.8.0.tar.gz 1475998 +MD5 cd55f55ddd646eb79d4e4df99d4c777f mjpegtools-m4-1.tar.bz2 4547 +RMD160 b81b89bb6364023606a1d3ca9519e143fe053ab4 mjpegtools-m4-1.tar.bz2 4547 +SHA256 10de1e206ee9c84aae111e95f655ad9394be749bfed01d337f7ff9a983aab522 mjpegtools-m4-1.tar.bz2 4547 diff --git a/media-video/mjpegtools/files/mjpegtools-1.8.0-fix-lav2mpeg.patch b/media-video/mjpegtools/files/mjpegtools-1.8.0-fix-lav2mpeg.patch new file mode 100644 index 000000000000..ac8afc0b94de --- /dev/null +++ b/media-video/mjpegtools/files/mjpegtools-1.8.0-fix-lav2mpeg.patch @@ -0,0 +1,22 @@ +diff -ru mjpegtools-1.8.0-orig/scripts/lav2mpeg mjpegtools-1.8.0-fixed-lav2mpeg/scripts/lav2mpeg +--- mjpegtools-1.8.0-orig/scripts/lav2mpeg 2006-11-19 17:11:41.000000000 +0100 ++++ mjpegtools-1.8.0-fixed-lav2mpeg/scripts/lav2mpeg 2006-11-19 17:22:21.000000000 +0100 +@@ -267,7 +267,8 @@ + + # lavinfo should set up video_frames, video_width + # video_height, video_inter, video_norm, audio_chans +-eval $($LAVINFO $@ | grep "=") # grep for = to remove Warnings ++# Add backslashes to protect contained spaces ++eval $($LAVINFO $@ | grep "=" | sed -e 's: :\\ :g') # grep for = to remove Warnings + if [ "$video_frames" == "" ]; then + logIt "'lavinfo $@' died! exiting" + logIt " maybe you don't have lavinfo. or your input flags were wrong" +@@ -401,7 +402,7 @@ + fi + fi + +-if [ $video_inter -eq 1 ]; then ++if [[ ${video_inter/interlacing/} != ${video_inter} ]]; then + yuvdenoise_flags="$yuvdenoise_flags -F" + fi + diff --git a/media-video/mjpegtools/files/mjpegtools-1.8.0-lavrec-memleak.patch b/media-video/mjpegtools/files/mjpegtools-1.8.0-lavrec-memleak.patch new file mode 100644 index 000000000000..47705044ebdb --- /dev/null +++ b/media-video/mjpegtools/files/mjpegtools-1.8.0-lavrec-memleak.patch @@ -0,0 +1,78 @@ +--- mjpegtools-1.8.0/lavtools/lav_io.c 2005-08-27 13:47:20.000000000 +0200 ++++ mjpegtools-1.8.0___fixed/lavtools/lav_io.c 2006-05-14 05:45:48.000000000 +0200 +@@ -540,15 +540,12 @@ + + int lav_write_audio(lav_file_t *lav_file, uint8_t *buff, long samps) + { +- int res; ++ int res = -1; + #ifdef HAVE_LIBQUICKTIME + int i, j; +- int16_t *qt_audio = (int16_t *)buff, **qt_audion; ++ int16_t *buff16 = (int16_t *)buff, **qt_audion; + int channels = lav_audio_channels(lav_file); +- +- qt_audion = malloc(channels * sizeof (int16_t **)); +- for (i = 0; i < channels; i++) +- qt_audion[i] = (int16_t *)malloc(samps * lav_file->bps); ++ int bits = lav_audio_bits(lav_file); + #endif + + video_format = lav_file->format; internal_error = 0; /* for error messages */ +@@ -557,24 +554,43 @@ + { + case 'a': + case 'A': +- res = AVI_write_audio( lav_file->avi_fd, buff, samps*lav_file->bps); ++ res = AVI_write_audio(lav_file->avi_fd, buff, samps*lav_file->bps); + break; + #ifdef HAVE_LIBQUICKTIME + case 'q': +- /* Deinterleave the audio into the two channels. */ +- for (i = 0; i < samps; i++) +- { +- for (j = 0; j < channels; j++) +- qt_audion[j][i] = qt_audio[(channels*i) + j]; +- } +- res = lqt_encode_audio_track(lav_file->qt_fd, qt_audion, NULL,samps,0); +- for (j = 0; j < channels; j++) +- free(qt_audion[j]); +- free(qt_audion); +- break; ++ if (bits != 16 || channels > 1) ++ { ++ /* Deinterleave the audio into the two channels and/or convert ++ * bits per sample to the required format. ++ */ ++ qt_audion = malloc(channels * sizeof(*qt_audion)); ++ for (i = 0; i < channels; i++) ++ qt_audion[i] = malloc(samps * sizeof(**qt_audion)); ++ ++ if (bits == 16) ++ for (i = 0; i < samps; i++) ++ for (j = 0; j < channels; j++) ++ qt_audion[j][i] = buff16[channels * i + j]; ++ else ++ if (bits == 8) ++ for (i = 0; i < samps; i++) ++ for (j = 0; j < channels; j++) ++ qt_audion[j][i] = ((int16_t)(buff[channels * i + j]) << 8) ^ 0x8000; ++ ++ if (bits == 8 || bits == 16) ++ res = lqt_encode_audio_track(lav_file->qt_fd, qt_audion, NULL, samps, 0); ++ ++ for (i = 0; i < channels; i++) ++ free(qt_audion[i]); ++ free(qt_audion); ++ } else { ++ qt_audion = &buff16; ++ res = lqt_encode_audio_track(lav_file->qt_fd, qt_audion, NULL, samps, 0); ++ } ++ break; + #endif + default: +- res = -1; ++ break; + } + + return res; |