diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /media-video/cinelerra |
reinit the tree, so we can have metadata
Diffstat (limited to 'media-video/cinelerra')
-rw-r--r-- | media-video/cinelerra/Manifest | 16 | ||||
-rw-r--r-- | media-video/cinelerra/cinelerra-2.3.ebuild | 116 | ||||
-rw-r--r-- | media-video/cinelerra/files/cinelerra-20140710-ffmpeg-0.11.patch | 134 | ||||
-rw-r--r-- | media-video/cinelerra/files/cinelerra-20140710-underlinking.patch | 16 | ||||
-rw-r--r-- | media-video/cinelerra/files/cinelerra-20140710-validate_desktop_entry.patch | 14 | ||||
-rw-r--r-- | media-video/cinelerra/files/cinelerra-ffmpeg.patch | 76 | ||||
-rw-r--r-- | media-video/cinelerra/files/cinelerra-ffmpeg2.patch | 218 | ||||
-rw-r--r-- | media-video/cinelerra/files/cinelerra-ffmpeg29.patch | 658 | ||||
-rw-r--r-- | media-video/cinelerra/files/cinelerra-implicit_decls.patch | 36 | ||||
-rw-r--r-- | media-video/cinelerra/files/cinelerra-includes.patch | 12 | ||||
-rw-r--r-- | media-video/cinelerra/files/cinelerra-libav9.patch | 93 | ||||
-rw-r--r-- | media-video/cinelerra/files/cinelerra-pngtoh.patch | 15 | ||||
-rw-r--r-- | media-video/cinelerra/files/cinelerra-putbits-gcc52.patch | 29 | ||||
-rw-r--r-- | media-video/cinelerra/metadata.xml | 8 |
14 files changed, 1441 insertions, 0 deletions
diff --git a/media-video/cinelerra/Manifest b/media-video/cinelerra/Manifest new file mode 100644 index 000000000000..e1f449502165 --- /dev/null +++ b/media-video/cinelerra/Manifest @@ -0,0 +1,16 @@ +AUX cinelerra-20140710-ffmpeg-0.11.patch 4029 SHA256 84f4b3da2687ff126f70e268e81fd99020b837a606c879e0acdf60d166791d3a SHA512 bd1a511d616c8c1661b05db4297dea7c57702658ecb1a18c8cb930a78f396f28f29e87275ec75e70140048caba454e577062c15efb1dcd49c1bf35f51b82cfa0 WHIRLPOOL 08f8050bdc9bf19e238a3cdd85277f8c06a3ce9e12376bc53e043d86e590694fcf59479762ec2fd8c7a2eee3fc910972a2ba4293120c6d94a6278f0decbf59fb +AUX cinelerra-20140710-underlinking.patch 273 SHA256 3a236dfcd3eabc921156f29fa3d4d4a077f87f5b8773aef725a38b54309e443f SHA512 09db68fecaa8591b5ca1f90b654d30f436c2dcec82642c76303f1db2450bfe90ee0a880decb4fb148a05b24605eacaee566d082bf4ff256ed1a0c099479054ca WHIRLPOOL de3314bf5f6ea09c3aeda022921f78230fd1bca604a7d9cd0fe3bc1bd605abb5e5be1646d32b79b1091227abf254963d02aae6a8efe3ec337dd2bef1ab51e38b +AUX cinelerra-20140710-validate_desktop_entry.patch 338 SHA256 b26b1f57f7895a3149f840cea1c3292f7ed08225db1a0759fc0cd06d2be92451 SHA512 a8b2d629c952187741671db1806b126a9abf05167fe6fa103053e35354301af168d0fa98146c9007216e6c551b0ed72d518cec543c6e0cdb49959de3b73d8d83 WHIRLPOOL 26a9fbed8dd70c9aaa3c539179abad56fd311b58b8fa5769d20e52d83c5ddd45ef756030c4de446e75608de14ce4dd8ff79f4984bb628aa015a75864719863b5 +AUX cinelerra-ffmpeg.patch 2472 SHA256 d97aac356406258d064a28879c0550ef8e69eaffa247fdb2ebd44b6d858ed3a2 SHA512 59299661832f5631d9a07a0eab0685f897a39acf6c9e8a3f79730f9479c942775005f59abb29f40c9df7446882ccac332fd97bb6387807f41c35e67301022196 WHIRLPOOL 59eaafb82c666bfcf0796a12d4c3c28fa266564001f5bef59a632b08a8c70ac0558b6f52516f1210d527aff343bd59789f7e0498662aaa26ffa937b41ea01477 +AUX cinelerra-ffmpeg2.patch 7440 SHA256 143a7803b1f49589aaa5a50813d576d766b7918faf8df0a8fcd5909c3a6bc8a0 SHA512 c0c5a6e72ca925ca7c0b724aad08bf3c40697903683c7628801e3aceb1f5724e24a634c0d43527ed3256934eed90d30d54b97683c107fcb5519367f921c5a4bd WHIRLPOOL 9e745968499572de12e96f96d17aef8e1400ea85ceb69829514a2718baa1e30b70dca5f846529f3e3a2fdcc7c97ff0f6c1237c0af33b60d19cdde582dec9ed2e +AUX cinelerra-ffmpeg29.patch 22007 SHA256 7b27bef9fb11d3c5b27e57a58969f93d79ccf5978914afaa532a085b1b0380ca SHA512 1ec88f44348a67c98931a27225fd0df29afa319b4b36ab5397f37a0d0f7a5707f8cafd93955091f82759e1bc2f73edcff164baa6959fa064afc82f6b17b3fb93 WHIRLPOOL 5ce0c9162b96af45c479e689f3cb2128f4c14f0ce735ebc9753cd7c9550816e4c6f0cd42c8b89bf02c21fce96f8b5d5bf93da8c1f98a2d9f92a2a8ab781dccb6 +AUX cinelerra-implicit_decls.patch 1019 SHA256 7ac6381337b1dc325a10f82c2ad7a9a4e72dfd4df4f53377061342206b3a8118 SHA512 20dfcf31de8cfd4c7e1564839366798d37570b939ee14b53c06ffacd1d9e45bd2247e4c85e70b5289c6150dc1927fa103df3d5f7ef5494487a38dc98d62966f5 WHIRLPOOL f479cb5f50d1dffa1c8c139fa7dd9827f6836b647bf889c296244612da3b61ca1929b17d80aab7cfd958b1885914eded53c7ea749a2c41faff149a480a485aa3 +AUX cinelerra-includes.patch 312 SHA256 2a807d24e8fcdeed1aa65dd3c1acdac0fcfc67800041917e4a50192db5b19ed7 SHA512 42f0fba5d071e1f811d0700a799c2cad7af62aa7a21324b66a7944b3bf8955afc512f7de5fc2ec21fd9310036acc1ad16de672fcd7bdb4bad7d5d92ae4bfd38a WHIRLPOOL bc7177489370f4a96f6be3d05ac5e82ea058d7a84c2132b240d992b91fd993ea1e04c635bd6ddffd8512d60b6ef5bbe3c3b75ccb45246c1a28f5369dcff4b01a +AUX cinelerra-libav9.patch 3760 SHA256 9a29f6f8f8ea23b9f856709f4e210ef7e25ea73ab6d806a00b3b7509ff69903b SHA512 c6bd7a3ffd02daebd3575a4d99cbfd9bb5278dfce66f5c2289c57793f1b9c9994207c63ecdb2a5a3bcbd0d4ddb5cece4d973dd488c9308ddd5501f5bad201cc2 WHIRLPOOL d9b6c10e4dbb2c7da6db0773752fcfef40aea9ecc981181ddb6c7774eb76b363505c4aaba8ed999385bdfd29328975c1bf870ac7b42dbc9eb1a4ccbee219a408 +AUX cinelerra-pngtoh.patch 298 SHA256 1237f420c1057cac28cd62f72cf54470bd1156675a9f6140ef344fffa583d5d3 SHA512 1e3fe901b193aa2ce6237910894be5351c32162d5588485ab86ec36f72bb85e69c78f6d64ae3a0665450206604717e3fce7ec767910bf5e28780882b9f38a0bb WHIRLPOOL cc52d9c07614efb9beeac39bed046e33fd9f5dd74a1cbbac963d2f9dc6eed70825ce0c615b8a3408139ceccb153b55616938beeaf3db850edf0fac2c25b3e9d3 +AUX cinelerra-putbits-gcc52.patch 1222 SHA256 f571d3f62483b05d035d05b3650cf74ffd1d48da2c2cd9d07aa5fd8eead75216 SHA512 523acccdf22ae7c4d78df554ddd8b4f957dc7e3948bedd61e7e8ed07725d28a14df478a3d01e88d4223f90ae6661c70fcc406d9829b685b1fce20892c2306f0d WHIRLPOOL 71d1f7c2e348aa067f601e13cb85f670b415532719193fa5c29ee80cbc7160435846721dd14ee0a992620c57dc5a58f05461b19fa063683a79e3539e5b9f5670 +DIST CinelerraCV-2.3.tar.xz 25705608 SHA256 4bcb450347de5eccea0ed6d49d6d70e4b065905516e4416f9a788d0d7ccc926f SHA512 908dc097af8507e3b60b4787e0350500b8ba8c4340bbbdbf3716e61d74074e5f0617500b94ed1d450e030f88f3821f948cfa37c247ec2c2571fd76974374868e WHIRLPOOL 52a74c74cfeacbebd3cf3e2aced7a0054b68ce3ec04309ac608c4e1e5779a9ced8d9ea50a0898b610288aef588b613455b38b46af3ab67c44f3581ef3676b79e +EBUILD cinelerra-2.3.ebuild 2974 SHA256 57961ce1e6e05fb2b6b1f51cddf42e6e45056e33961f41092df28df7cc4aa884 SHA512 181cdec14eb74ffdcf0d4166db9995cdf3cfd7a5d1b2ba5839ae099f217fea6d14204ccebec4e5544365960a687891e82b25e79a2a9f635555a416c2602cd26c WHIRLPOOL 1851333c133a7aa178b9054f705864973b011b0c84901e47d756a68066db57ad52eab63ea9f57ebfb06b3a08c4c0327f5f6463ec5cb8dd2672873bcdc6a2a4cc +MISC ChangeLog 3445 SHA256 4a279d497646371752d9389a731919268aaf010d6c36bb1877b84af07fe8c579 SHA512 6450edf372359df0006c101845927bca321513ee476b749b64120a8d17637863ef84908527d92896e630cdded29e91058df9f13d6b007206011f0a37ed2da087 WHIRLPOOL 8706ab66b1dfd167951a794522d14ede811cb52f3f29f7b63deb49e78aa91b309daa15326e01cfd05b3c7207ee5ce32d997950aef51ab9aaa288c823d46bc675 +MISC ChangeLog-2015 15615 SHA256 aeb6c42fef8cff71fb6fdf3b1620cb087e5ddf0bf2b778e36ddb4722e83eafcb SHA512 b087f3fcda896469d549a366fb3c8f70b83ad37b42417c4b9e1163d6946e857781321f8ec1f7ca00feb77a46635a855fd9671f6f908d2201e914465f2f26d617 WHIRLPOOL 4450c766e7e3d9d2e48a9d9f603f3725e3effb72ad95731460a725abb320783a832697c411c356f075f53096005d0d6a91405f602d4c47b68782f8b763c33165 +MISC metadata.xml 259 SHA256 4852206a3072932a61ab8385eb59e71e039db9ef45a58388793b666cf5e45605 SHA512 c81aea0e68817fa210dc6f66313aee75246139e50d6324338707f11bca2173c64e88ce8440794c85eb64194ff97cf6c6760a06b4822a121e40629bdc3a04e1fd WHIRLPOOL f099222dbec5aedb3b5bd21a72bd6b33869fa88d1c7c5748d39c346cf0194ea495ba7e987c26fbf360407a174d6b8b7bf02aa00482bca341eb3db0bb6bb9ef19 diff --git a/media-video/cinelerra/cinelerra-2.3.ebuild b/media-video/cinelerra/cinelerra-2.3.ebuild new file mode 100644 index 000000000000..812eb75dbb32 --- /dev/null +++ b/media-video/cinelerra/cinelerra-2.3.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils multilib flag-o-matic + +DESCRIPTION="The most advanced non-linear video editor and compositor" +HOMEPAGE="http://www.cinelerra.org/" +SRC_URI="https://cinelerra-cv.org/releases/CinelerraCV-${PV}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" +IUSE="cpu_flags_x86_3dnow alsa altivec css debug ieee1394 cpu_flags_x86_mmx opengl oss" + +RDEPEND="media-libs/a52dec:= + media-libs/faac:= + media-libs/faad2:= + >=media-libs/freetype-2 + media-libs/fontconfig + media-libs/libdv:= + >=media-libs/libogg-1.2:= + media-libs/libpng:0= + media-libs/libsndfile:= + >=media-libs/libtheora-1.1:= + >=media-libs/libvorbis-1.3:= + >=media-libs/openexr-1.5:= + media-libs/tiff:0= + media-libs/x264:= + media-sound/lame:= + >=media-video/mjpegtools-2 + >=sci-libs/fftw-3 + x11-libs/libX11:= + x11-libs/libXext:= + x11-libs/libXft:= + x11-libs/libXv:= + x11-libs/libXvMC:= + x11-libs/libXxf86vm:= + virtual/ffmpeg + || ( media-video/ffmpeg:0[postproc(-)] media-libs/libpostproc ) + virtual/jpeg:0 + alsa? ( media-libs/alsa-lib:= ) + ieee1394? ( + media-libs/libiec61883:= + >=sys-libs/libraw1394-1.2.0:= + >=sys-libs/libavc1394-0.5.0:= + ) + opengl? ( + virtual/glu + virtual/opengl + )" +DEPEND="${RDEPEND} + app-arch/xz-utils + virtual/pkgconfig + cpu_flags_x86_mmx? ( dev-lang/nasm )" + +S="${WORKDIR}/CinelerraCV-${PV}" + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-20140710-validate_desktop_entry.patch \ + "${FILESDIR}"/${PN}-ffmpeg.patch \ + "${FILESDIR}"/${PN}-20140710-underlinking.patch \ + "${FILESDIR}"/${PN}-20140710-ffmpeg-0.11.patch \ + "${FILESDIR}"/${PN}-libav9.patch \ + "${FILESDIR}"/${PN}-pngtoh.patch \ + "${FILESDIR}"/${PN}-putbits-gcc52.patch \ + "${FILESDIR}"/${PN}-implicit_decls.patch \ + "${FILESDIR}"/${PN}-includes.patch + + if has_version '>=media-video/ffmpeg-2' ; then + epatch "${FILESDIR}"/${PN}-ffmpeg2.patch + fi + + if has_version '>=media-video/ffmpeg-2.9' ; then + epatch "${FILESDIR}"/${PN}-ffmpeg29.patch + fi + + eautoreconf +} + +src_configure() { + append-cppflags -D__STDC_CONSTANT_MACROS #321945 + append-ldflags -Wl,-z,noexecstack #212959 + + local myconf + use debug && myconf='--enable-x-error-output' + + econf \ + $(use_enable oss) \ + $(use_enable alsa) \ + --disable-esd \ + $(use_enable ieee1394 firewire) \ + $(use_enable css) \ + $(use_enable cpu_flags_x86_mmx mmx) \ + $(use_enable cpu_flags_x86_3dnow 3dnow) \ + $(use_enable altivec) \ + $(use_enable opengl) \ + --with-plugindir=/usr/$(get_libdir)/${PN} \ + --with-buildinfo=cust/"Gentoo - ${PV}" \ + --with-external-ffmpeg \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + dohtml -a png,html,texi,sdw -r doc/* + + rm -rf "${D}"/usr/include + mv -vf "${D}"/usr/bin/mpeg3cat{,.hv} || die + mv -vf "${D}"/usr/bin/mpeg3dump{,.hv} || die + mv -vf "${D}"/usr/bin/mpeg3toc{,.hv} || die + dosym /usr/bin/mpeg2enc /usr/$(get_libdir)/${PN}/mpeg2enc.plugin + + prune_libtool_files --all +} diff --git a/media-video/cinelerra/files/cinelerra-20140710-ffmpeg-0.11.patch b/media-video/cinelerra/files/cinelerra-20140710-ffmpeg-0.11.patch new file mode 100644 index 000000000000..2aebd7008c3c --- /dev/null +++ b/media-video/cinelerra/files/cinelerra-20140710-ffmpeg-0.11.patch @@ -0,0 +1,134 @@ +--- cinelerra/ffmpeg.C ++++ cinelerra/ffmpeg.C +@@ -23,7 +23,6 @@ + + int FFMPEG::init(char *codec_string) { + +- avcodec_init(); + avcodec_register_all(); + + CodecID id = codec_id(codec_string); +--- cinelerra/fileac3.C ++++ cinelerra/fileac3.C +@@ -84,7 +84,6 @@ + + if(wr) + { +- avcodec_init(); + avcodec_register_all(); + codec = avcodec_find_encoder(CODEC_ID_AC3); + if(!codec) +--- configure.ac ++++ configure.ac +@@ -497,7 +497,7 @@ + AC_ARG_WITH([external-ffmpeg], AC_HELP_STRING([--with-external-ffmpeg], [use external ffmpeg library])) + + if test "x$with_external_ffmpeg" = "xyes"; then +- PKG_CHECK_MODULES([FFMPEG_TEMP], [libavcodec libpostproc]) ++ PKG_CHECK_MODULES([FFMPEG_TEMP], [libavcodec libpostproc libavutil]) + FFMPEG_FOLDER="" + FFMPEG_EXTERNALTEXT="External ffmpeg" + +@@ -515,10 +515,10 @@ + AC_MSG_RESULT($enable_ffmpeg_swscale) + if test x"$enable_ffmpeg_swscale" = xyes; then + dnl AC_DEFINE(HAVE_SWSCALER) +- PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc libswscale]) ++ PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc libswscale libavutil]) + FFMPEG_CFLAGS="$FFMPEG_CFLAGS -I/usr/include/libavcodec -I/usr/include/libswscale -DHAVE_SWSCALER" + else +- PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc]) ++ PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc libavutil]) + fi + FFMPEG_EXTERNALTEXT="External ffmpeg" + else +--- quicktime/mpeg4.c ++++ quicktime/mpeg4.c +@@ -624,12 +624,12 @@ + else + // ffmpeg section + { ++ AVDictionary ** opts = NULL; + static char *video_rc_eq="tex^qComp"; + codec->encode_initialized[current_field] = 1; + if(!ffmpeg_initialized) + { + ffmpeg_initialized = 1; +- avcodec_init(); + avcodec_register_all(); + } + +@@ -673,8 +673,10 @@ + context->b_quant_offset = 1.25; + #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) + context->error_resilience = FF_ER_CAREFUL; +-#else ++#elif LIBAVCODEC_VERSION_INT < ((54<<16)+(0<<8)+0) + context->error_recognition = FF_ER_CAREFUL; ++#else ++ context->err_recognition |= AV_EF_CAREFUL; + #endif + context->error_concealment = 3; + context->frame_skip_cmp = FF_CMP_DCTMAX; +@@ -699,7 +701,7 @@ + context->profile= FF_PROFILE_UNKNOWN; + context->rc_buffer_aggressivity = 1.0; + context->level= FF_LEVEL_UNKNOWN; +- context->flags |= CODEC_FLAG_H263P_UMV; ++ av_dict_set(opts, "umv", "1", 0); + context->flags |= CODEC_FLAG_AC_PRED; + + // All the forbidden settings can be extracted from libavcodec/mpegvideo.c of ffmpeg... +@@ -717,10 +719,8 @@ + (codec->ffmpeg_id == CODEC_ID_MPEG4 || + codec->ffmpeg_id == CODEC_ID_MPEG1VIDEO || + codec->ffmpeg_id == CODEC_ID_MPEG2VIDEO || +- codec->ffmpeg_id == CODEC_ID_H263P || +- codec->ffmpeg_id == CODEC_FLAG_H263P_SLICE_STRUCT)) ++ codec->ffmpeg_id == CODEC_ID_H263P )) + { +- avcodec_thread_init(context, file->cpus); + context->thread_count = file->cpus; + } + +@@ -740,7 +740,7 @@ + * codec->fix_bitrate, + * codec->quantizer); + */ +- avcodec_open(context, codec->encoder[current_field]); ++ avcodec_open2(context, codec->encoder[current_field], opts); + + avcodec_get_frame_defaults(&codec->picture[current_field]); + +--- quicktime/qtffmpeg.c ++++ quicktime/qtffmpeg.c +@@ -54,7 +54,6 @@ + if(!ffmpeg_initialized) + { + ffmpeg_initialized = 1; +- avcodec_init(); + avcodec_register_all(); + } + +@@ -90,10 +89,8 @@ + (ffmpeg_id == CODEC_ID_MPEG4 || + ffmpeg_id == CODEC_ID_MPEG1VIDEO || + ffmpeg_id == CODEC_ID_MPEG2VIDEO || +- ffmpeg_id == CODEC_ID_H263P || +- ffmpeg_id == CODEC_FLAG_H263P_SLICE_STRUCT)) ++ ffmpeg_id == CODEC_ID_H263P )) + { +- avcodec_thread_init(context, cpus); + context->thread_count = cpus; + } + if(avcodec_open(context, +--- quicktime/wma.c ++++ quicktime/wma.c +@@ -67,7 +67,6 @@ + if(!ffmpeg_initialized) + { + ffmpeg_initialized = 1; +- avcodec_init(); + avcodec_register_all(); + } + diff --git a/media-video/cinelerra/files/cinelerra-20140710-underlinking.patch b/media-video/cinelerra/files/cinelerra-20140710-underlinking.patch new file mode 100644 index 000000000000..a7dc74f2d445 --- /dev/null +++ b/media-video/cinelerra/files/cinelerra-20140710-underlinking.patch @@ -0,0 +1,16 @@ +http://bugs.gentoo.org/367509 + +pluginserver.C is using dlsym, dlopen, dlclose and dlerror + +--- cinelerra/Makefile.am ++++ cinelerra/Makefile.am +@@ -692,7 +692,8 @@ + $(LIBDV_LIBS) \ + -luuid \ + $(MJPEG_LIBS) \ +- -lstdc++ ++ -lstdc++ \ ++ -ldl + + EXTRA_DIST = gen-feather-h + diff --git a/media-video/cinelerra/files/cinelerra-20140710-validate_desktop_entry.patch b/media-video/cinelerra/files/cinelerra-20140710-validate_desktop_entry.patch new file mode 100644 index 000000000000..006217586630 --- /dev/null +++ b/media-video/cinelerra/files/cinelerra-20140710-validate_desktop_entry.patch @@ -0,0 +1,14 @@ +--- image/cinelerra-cv.desktop ++++ image/cinelerra-cv.desktop +@@ -5,9 +5,8 @@ + Name[fr]=Cinelerra-CV + Name[es]=Cinelerra-CV + Comment=Video Editor +-Categories=Application;AudioVideo;Multimedia;VideoEditing; +-Encoding=UTF-8 ++Categories=AudioVideo; + Exec=cinelerra +-Icon=cinelerra-cv.xpm ++Icon=cinelerra-cv + Terminal=false + Type=Application diff --git a/media-video/cinelerra/files/cinelerra-ffmpeg.patch b/media-video/cinelerra/files/cinelerra-ffmpeg.patch new file mode 100644 index 000000000000..6f7962fb1a54 --- /dev/null +++ b/media-video/cinelerra/files/cinelerra-ffmpeg.patch @@ -0,0 +1,76 @@ +Fix build with ffmpeg/libav trunk / 0.7 + +Index: cinelerra-20101104/cinelerra/ffmpeg.C +=================================================================== +--- cinelerra-20101104.orig/cinelerra/ffmpeg.C ++++ cinelerra-20101104/cinelerra/ffmpeg.C +@@ -364,12 +364,15 @@ int FFMPEG::decode(uint8_t *data, long d + + // NOTE: frame must already have data space allocated + ++ AVPacket pkt; + got_picture = 0; +- int length = avcodec_decode_video(context, ++ av_init_packet( &pkt ); ++ pkt.data = data; ++ pkt.size = data_size; ++ int length = avcodec_decode_video2(context, + picture, + &got_picture, +- data, +- data_size); ++ &pkt); + + if (length < 0) { + printf("FFMPEG::decode error decoding frame\n"); +Index: cinelerra-20101104/quicktime/qtffmpeg.c +=================================================================== +--- cinelerra-20101104.orig/quicktime/qtffmpeg.c ++++ cinelerra-20101104/quicktime/qtffmpeg.c +@@ -181,6 +181,7 @@ static int decode_wrapper(quicktime_t *f + + if(!result) + { ++ AVPacket pkt; + + + // No way to determine if there was an error based on nonzero status. +@@ -189,11 +190,13 @@ static int decode_wrapper(quicktime_t *f + ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_NONREF /* AVDISCARD_BIDIR */; + else + ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_DEFAULT; +- result = avcodec_decode_video(ffmpeg->decoder_context[current_field], ++ av_init_packet( &pkt ); ++ pkt.data = ffmpeg->work_buffer; ++ pkt.size = bytes + header_bytes; ++ result = avcodec_decode_video2(ffmpeg->decoder_context[current_field], + &ffmpeg->picture[current_field], + &got_picture, +- ffmpeg->work_buffer, +- bytes + header_bytes); ++ &pkt); + + + +Index: cinelerra-20101104/quicktime/wma.c +=================================================================== +--- cinelerra-20101104.orig/quicktime/wma.c ++++ cinelerra-20101104/quicktime/wma.c +@@ -195,11 +195,14 @@ printf("decode 2 %x %llx %llx\n", chunk_ + chunk_size); + #else + bytes_decoded = AVCODEC_MAX_AUDIO_FRAME_SIZE; +- result = avcodec_decode_audio2(codec->decoder_context, ++ AVPacket pkt; ++ av_init_packet( &pkt ); ++ pkt.data = codec->packet_buffer; ++ pkt.size = chunk_size; ++ result = avcodec_decode_audio3(codec->decoder_context, + (int16_t*)(codec->work_buffer + codec->output_size * sample_size), + &bytes_decoded, +- codec->packet_buffer, +- chunk_size); ++ &pkt); + #endif + + pthread_mutex_unlock(&ffmpeg_lock); diff --git a/media-video/cinelerra/files/cinelerra-ffmpeg2.patch b/media-video/cinelerra/files/cinelerra-ffmpeg2.patch new file mode 100644 index 000000000000..01680ac952f1 --- /dev/null +++ b/media-video/cinelerra/files/cinelerra-ffmpeg2.patch @@ -0,0 +1,218 @@ +https://bugs.gentoo.org/show_bug.cgi?id=479394 +By Helmut Jarausch + +--- cinelerra/ffmpeg.h.ORIG 2012-07-06 22:40:26.000000000 +0200 ++++ cinelerra/ffmpeg.h 2013-08-01 12:58:12.342474136 +0200 +@@ -26,7 +26,7 @@ + static int convert_cmodel_transfer(VFrame *frame_in,VFrame *frame_out); + static int init_picture_from_frame(AVPicture *picture, VFrame *frame); + +- static CodecID codec_id(char *codec_string); ++ static AVCodecID codec_id(char *codec_string); + + private: + static PixelFormat color_model_to_pix_fmt(int color_model); +--- cinelerra/ffmpeg.C.ORIG 2013-08-01 11:24:43.794419246 +0200 ++++ cinelerra/ffmpeg.C 2013-08-01 12:57:48.121473899 +0200 +@@ -25,7 +25,7 @@ + + avcodec_register_all(); + +- CodecID id = codec_id(codec_string); ++ AVCodecID id = codec_id(codec_string); + codec = avcodec_find_decoder(id); + if (codec == NULL) { + printf("FFMPEG::init no decoder for '%s'", codec_string); +@@ -51,7 +51,7 @@ + } + + +-CodecID FFMPEG::codec_id(char *codec_string) { ++AVCodecID FFMPEG::codec_id(char *codec_string) { + #define CODEC_IS(x) (! strncmp(codec_string, x, 4)) + + if (CODEC_IS(QUICKTIME_DV) || +--- quicktime/ffmpeg/ffmpeg.c.ORIG 2012-07-06 22:40:26.000000000 +0200 ++++ quicktime/ffmpeg/ffmpeg.c 2013-08-01 12:57:59.025474005 +0200 +@@ -2663,7 +2663,7 @@ + return 0; + } + +-static enum CodecID find_codec_or_die(const char *name, int type, int encoder) ++static enum AVCodecID find_codec_or_die(const char *name, int type, int encoder) + { + const char *codec_string = encoder ? "encoder" : "decoder"; + AVCodec *codec; +--- quicktime/ffmpeg/libavformat/electronicarts.c.ORIG 2012-07-06 22:40:26.000000000 +0200 ++++ quicktime/ffmpeg/libavformat/electronicarts.c 2013-08-01 13:00:57.855475755 +0200 +@@ -49,11 +49,11 @@ + typedef struct EaDemuxContext { + int big_endian; + +- enum CodecID video_codec; ++ enum AVCodecID video_codec; + AVRational time_base; + int video_stream_index; + +- enum CodecID audio_codec; ++ enum AVCodecID audio_codec; + int audio_stream_index; + int audio_frame_counter; + +--- quicktime/ffmpeg/libavformat/img2.c.ORIG 2012-07-06 22:40:26.000000000 +0200 ++++ quicktime/ffmpeg/libavformat/img2.c 2013-08-01 12:59:21.408474812 +0200 +@@ -34,7 +34,7 @@ + } VideoData; + + typedef struct { +- enum CodecID id; ++ enum AVCodecID id; + const char *str; + } IdStrMap; + +@@ -97,7 +97,7 @@ + } + return -1; + } +-static enum CodecID av_str2id(const IdStrMap *tags, const char *str) ++static enum AVCodecID av_str2id(const IdStrMap *tags, const char *str) + { + str= strrchr(str, '.'); + if(!str) return CODEC_ID_NONE; +@@ -175,7 +175,7 @@ + return 0; + } + +-enum CodecID av_guess_image2_codec(const char *filename){ ++enum AVCodecID av_guess_image2_codec(const char *filename){ + return av_str2id(img_tags, filename); + } + +--- quicktime/ffmpeg/libavformat/matroskadec.c.ORIG 2012-07-06 22:40:26.000000000 +0200 ++++ quicktime/ffmpeg/libavformat/matroskadec.c 2013-08-01 12:59:57.556475165 +0200 +@@ -2476,7 +2476,7 @@ + AVStream *st; + + for (i = 0; i < matroska->num_tracks; i++) { +- enum CodecID codec_id = CODEC_ID_NONE; ++ enum AVCodecID codec_id = CODEC_ID_NONE; + uint8_t *extradata = NULL; + int extradata_size = 0; + int extradata_offset = 0; +@@ -2495,7 +2495,7 @@ + } + } + +- /* Set the FourCC from the CodecID. */ ++ /* Set the FourCC from the AVCodecID. */ + /* This is the MS compatibility mode which stores a + * BITMAPINFOHEADER in the CodecPrivate. */ + if (!strcmp(track->codec_id, +@@ -2600,7 +2600,7 @@ + + if (codec_id == CODEC_ID_NONE) { + av_log(matroska->ctx, AV_LOG_INFO, +- "Unknown/unsupported CodecID %s.\n", ++ "Unknown/unsupported AVCodecID %s.\n", + track->codec_id); + } + +--- quicktime/ffmpeg/libavformat/matroska.h.ORIG 2012-07-06 22:40:26.000000000 +0200 ++++ quicktime/ffmpeg/libavformat/matroska.h 2013-08-01 13:00:22.218475407 +0200 +@@ -220,12 +220,12 @@ + + typedef struct CodecTags{ + char str[16]; +- enum CodecID id; ++ enum AVCodecID id; + }CodecTags; + + typedef struct CodecMime{ + char str[32]; +- enum CodecID id; ++ enum AVCodecID id; + }CodecMime; + + #define MATROSKA_CODEC_ID_VIDEO_VFW_FOURCC "V_MS/VFW/FOURCC" +--- quicktime/ffmpeg/libavformat/mov.c.ORIG 2012-07-06 22:40:26.000000000 +0200 ++++ quicktime/ffmpeg/libavformat/mov.c 2013-08-01 12:59:33.935474934 +0200 +@@ -678,7 +678,7 @@ + + for(pseudo_stream_id=0; pseudo_stream_id<entries; pseudo_stream_id++) { + //Parsing Sample description table +- enum CodecID id; ++ enum AVCodecID id; + int dref_id; + MOV_atom_t a = { 0, 0, 0 }; + offset_t start_pos = url_ftell(pb); +--- quicktime/ffmpeg/libavformat/mxf.c.ORIG 2012-07-06 22:40:26.000000000 +0200 ++++ quicktime/ffmpeg/libavformat/mxf.c 2013-08-01 12:59:12.025474720 +0200 +@@ -157,7 +157,7 @@ + typedef struct { + UID uid; + unsigned matching_len; +- enum CodecID id; ++ enum AVCodecID id; + } MXFCodecUL; + + typedef struct { +--- quicktime/ffmpeg/libavformat/riff.h.ORIG 2012-07-06 22:40:26.000000000 +0200 ++++ quicktime/ffmpeg/libavformat/riff.h 2013-08-01 12:59:45.950475052 +0200 +@@ -48,7 +48,7 @@ + extern const AVCodecTag codec_wav_tags[]; + + unsigned int codec_get_tag(const AVCodecTag *tags, int id); +-enum CodecID codec_get_id(const AVCodecTag *tags, unsigned int tag); ++enum AVCodecID codec_get_id(const AVCodecTag *tags, unsigned int tag); + void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssize, int *au_scale); + + #endif /* FFMPEG_RIFF_H */ +--- quicktime/ffmpeg/libavformat/rtp.c.ORIG 2012-07-06 22:40:26.000000000 +0200 ++++ quicktime/ffmpeg/libavformat/rtp.c 2013-08-01 12:59:01.778474619 +0200 +@@ -40,7 +40,7 @@ + int pt; + const char enc_name[6]; + enum CodecType codec_type; +- enum CodecID codec_id; ++ enum AVCodecID codec_id; + int clock_rate; + int audio_channels; + } AVRtpPayloadTypes[]= +@@ -120,7 +120,7 @@ + return ""; + } + +-enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type) ++enum AVCodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type) + { + int i; + +--- quicktime/ffmpeg/libavformat/rtp_internal.h.ORIG 2012-07-06 22:40:26.000000000 +0200 ++++ quicktime/ffmpeg/libavformat/rtp_internal.h 2013-08-01 13:00:09.147475279 +0200 +@@ -61,7 +61,7 @@ + // fields from AVRtpDynamicPayloadType_s + const char enc_name[50]; /* XXX: still why 50 ? ;-) */ + enum CodecType codec_type; +- enum CodecID codec_id; ++ enum AVCodecID codec_id; + + // may be null + int (*parse_sdp_a_line) (AVStream * stream, +@@ -123,7 +123,7 @@ + + void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m); + const char *ff_rtp_enc_name(int payload_type); +-enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type); ++enum AVCodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type); + + void av_register_rtp_dynamic_payload_handlers(void); + +--- quicktime/wma.h.ORIG 2012-07-06 22:40:26.000000000 +0200 ++++ quicktime/wma.h 2013-08-01 13:11:46.431482103 +0200 +@@ -3,5 +3,6 @@ + + extern void quicktime_init_codec_wmav1(quicktime_audio_map_t *); + extern void quicktime_init_codec_wmav2(quicktime_audio_map_t *); ++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 + + #endif diff --git a/media-video/cinelerra/files/cinelerra-ffmpeg29.patch b/media-video/cinelerra/files/cinelerra-ffmpeg29.patch new file mode 100644 index 000000000000..604000eff380 --- /dev/null +++ b/media-video/cinelerra/files/cinelerra-ffmpeg29.patch @@ -0,0 +1,658 @@ +Index: cinelerra-20140710/cinelerra/ffmpeg.C +=================================================================== +--- cinelerra-20140710.orig/cinelerra/ffmpeg.C ++++ cinelerra-20140710/cinelerra/ffmpeg.C +@@ -38,7 +38,7 @@ int FFMPEG::init(char *codec_string) { + printf("FFMPEG::init avcodec_open() failed\n"); + } + +- picture = avcodec_alloc_frame(); ++ picture = av_frame_alloc(); + + + return 0; +@@ -55,62 +55,62 @@ AVCodecID FFMPEG::codec_id(char *codec_s + #define CODEC_IS(x) (! strncmp(codec_string, x, 4)) + + if (CODEC_IS(QUICKTIME_DV) || +- CODEC_IS(QUICKTIME_DVSD)) return CODEC_ID_DVVIDEO; ++ CODEC_IS(QUICKTIME_DVSD)) return AV_CODEC_ID_DVVIDEO; + + if (CODEC_IS(QUICKTIME_MP4V) || +- CODEC_IS(QUICKTIME_DIVX)) return CODEC_ID_MPEG4; ++ CODEC_IS(QUICKTIME_DIVX)) return AV_CODEC_ID_MPEG4; + +- return CODEC_ID_NONE; ++ return AV_CODEC_ID_NONE; + + #undef CODEC_IS + } + +-PixelFormat FFMPEG::color_model_to_pix_fmt(int color_model) { ++AVPixelFormat FFMPEG::color_model_to_pix_fmt(int color_model) { + switch (color_model) + { + case BC_YUV422: +- return PIX_FMT_YUYV422; ++ return AV_PIX_FMT_YUYV422; + case BC_RGB888: +- return PIX_FMT_RGB24; ++ return AV_PIX_FMT_RGB24; + case BC_BGR8888: // NOTE: order flipped +- return PIX_FMT_RGB32; ++ return AV_PIX_FMT_RGB32; + case BC_BGR888: +- return PIX_FMT_BGR24; ++ return AV_PIX_FMT_BGR24; + case BC_YUV420P: +- return PIX_FMT_YUV420P; ++ return AV_PIX_FMT_YUV420P; + case BC_YUV422P: +- return PIX_FMT_YUV422P; ++ return AV_PIX_FMT_YUV422P; + case BC_YUV444P: +- return PIX_FMT_YUV444P; ++ return AV_PIX_FMT_YUV444P; + case BC_YUV411P: +- return PIX_FMT_YUV411P; ++ return AV_PIX_FMT_YUV411P; + case BC_RGB565: +- return PIX_FMT_RGB565; ++ return AV_PIX_FMT_RGB565; + }; + +- return PIX_FMT_NB; ++ return AV_PIX_FMT_NB; + } + +-int FFMPEG::pix_fmt_to_color_model(PixelFormat pix_fmt) { ++int FFMPEG::pix_fmt_to_color_model(AVPixelFormat pix_fmt) { + switch (pix_fmt) + { +- case PIX_FMT_YUYV422: ++ case AV_PIX_FMT_YUYV422: + return BC_YUV422; +- case PIX_FMT_RGB24: ++ case AV_PIX_FMT_RGB24: + return BC_RGB888; +- case PIX_FMT_RGB32: ++ case AV_PIX_FMT_RGB32: + return BC_BGR8888; +- case PIX_FMT_BGR24: ++ case AV_PIX_FMT_BGR24: + return BC_BGR888; +- case PIX_FMT_YUV420P: ++ case AV_PIX_FMT_YUV420P: + return BC_YUV420P; +- case PIX_FMT_YUV422P: ++ case AV_PIX_FMT_YUV422P: + return BC_YUV422P; +- case PIX_FMT_YUV444P: ++ case AV_PIX_FMT_YUV444P: + return BC_YUV444P; +- case PIX_FMT_YUV411P: ++ case AV_PIX_FMT_YUV411P: + return BC_YUV411P; +- case PIX_FMT_RGB565: ++ case AV_PIX_FMT_RGB565: + return BC_RGB565; + }; + +@@ -119,7 +119,7 @@ int FFMPEG::pix_fmt_to_color_model(Pixel + + int FFMPEG::init_picture_from_frame(AVPicture *picture, VFrame *frame) { + int cmodel = frame->get_color_model(); +- PixelFormat pix_fmt = color_model_to_pix_fmt(cmodel); ++ AVPixelFormat pix_fmt = color_model_to_pix_fmt(cmodel); + + int size = avpicture_fill(picture, frame->get_data(), pix_fmt, + frame->get_w(), frame->get_h()); +@@ -142,16 +142,16 @@ int FFMPEG::init_picture_from_frame(AVPi + + int FFMPEG::convert_cmodel(VFrame *frame_in, VFrame *frame_out) { + +- PixelFormat pix_fmt_in = ++ AVPixelFormat pix_fmt_in = + color_model_to_pix_fmt(frame_in->get_color_model()); +- PixelFormat pix_fmt_out = ++ AVPixelFormat pix_fmt_out = + color_model_to_pix_fmt(frame_out->get_color_model()); + #ifdef HAVE_SWSCALER + // We need a context for swscale + struct SwsContext *convert_ctx; + #endif + // do conversion within libavcodec if possible +- if (pix_fmt_in != PIX_FMT_NB && pix_fmt_out != PIX_FMT_NB) { ++ if (pix_fmt_in != AV_PIX_FMT_NB && pix_fmt_out != AV_PIX_FMT_NB) { + // set up a temporary pictures from frame_in and frame_out + AVPicture picture_in, picture_out; + init_picture_from_frame(&picture_in, frame_in); +@@ -226,14 +226,14 @@ int FFMPEG::convert_cmodel_transfer(VFra + } + + +-int FFMPEG::convert_cmodel(AVPicture *picture_in, PixelFormat pix_fmt_in, ++int FFMPEG::convert_cmodel(AVPicture *picture_in, AVPixelFormat pix_fmt_in, + int width_in, int height_in, VFrame *frame_out) { + + // set up a temporary picture_out from frame_out + AVPicture picture_out; + init_picture_from_frame(&picture_out, frame_out); + int cmodel_out = frame_out->get_color_model(); +- PixelFormat pix_fmt_out = color_model_to_pix_fmt(cmodel_out); ++ AVPixelFormat pix_fmt_out = color_model_to_pix_fmt(cmodel_out); + + #ifdef HAVE_SWSCALER + // We need a context for swscale +@@ -242,7 +242,7 @@ int FFMPEG::convert_cmodel(AVPicture *pi + int result; + #ifndef HAVE_SWSCALER + // do conversion within libavcodec if possible +- if (pix_fmt_out != PIX_FMT_NB) { ++ if (pix_fmt_out != AV_PIX_FMT_NB) { + result = img_convert(&picture_out, + pix_fmt_out, + picture_in, +@@ -280,7 +280,7 @@ int FFMPEG::convert_cmodel(AVPicture *pi + // make an intermediate temp frame only if necessary + int cmodel_in = pix_fmt_to_color_model(pix_fmt_in); + if (cmodel_in == BC_TRANSPARENCY) { +- if (pix_fmt_in == PIX_FMT_RGB32) { ++ if (pix_fmt_in == AV_PIX_FMT_RGB32) { + // avoid infinite recursion if things are broken + printf("FFMPEG::convert_cmodel pix_fmt_in broken!\n"); + return 1; +Index: cinelerra-20140710/cinelerra/ffmpeg.h +=================================================================== +--- cinelerra-20140710.orig/cinelerra/ffmpeg.h ++++ cinelerra-20140710/cinelerra/ffmpeg.h +@@ -18,7 +18,7 @@ class FFMPEG + int init(char *codec_string); + int decode(uint8_t *data, long data_size, VFrame *frame_out); + +- static int convert_cmodel(AVPicture *picture_in, PixelFormat pix_fmt, ++ static int convert_cmodel(AVPicture *picture_in, AVPixelFormat pix_fmt, + int width_in, int height_in, + VFrame *frame_out); + static int convert_cmodel(VFrame *frame_in, VFrame *frame_out); +@@ -29,8 +29,8 @@ class FFMPEG + static AVCodecID codec_id(char *codec_string); + + private: +- static PixelFormat color_model_to_pix_fmt(int color_model); +- static int pix_fmt_to_color_model(PixelFormat pix_fmt); ++ static AVPixelFormat color_model_to_pix_fmt(int color_model); ++ static int pix_fmt_to_color_model(AVPixelFormat pix_fmt); + + int got_picture; + Asset *asset; +Index: cinelerra-20140710/cinelerra/fileac3.C +=================================================================== +--- cinelerra-20140710.orig/cinelerra/fileac3.C ++++ cinelerra-20140710/cinelerra/fileac3.C +@@ -85,7 +85,7 @@ int FileAC3::open_file(int rd, int wr) + if(wr) + { + avcodec_register_all(); +- codec = avcodec_find_encoder(CODEC_ID_AC3); ++ codec = avcodec_find_encoder(AV_CODEC_ID_AC3); + if(!codec) + { + eprintf("codec not found.\n"); +@@ -211,12 +211,56 @@ int FileAC3::write_samples(double **buff + current_sample + frame_size <= temp_raw_size; + current_sample += frame_size) + { +- int compressed_size = avcodec_encode_audio( +- codec_context, +- temp_compressed + output_size, +- compressed_allocated - output_size, +- temp_raw + current_sample * asset->channels); +- output_size += compressed_size; ++ AVPacket pkt; ++ AVFrame *frame; ++ int ret, samples_size, got_packet; ++ av_init_packet(&pkt); ++ pkt.data = temp_compressed + output_size; ++ pkt.size = compressed_allocated - output_size; ++ frame = av_frame_alloc(); ++ if(!frame) return AVERROR(ENOMEM); ++ if(codec_context->frame_size) { ++ frame->nb_samples = codec_context->frame_size; ++ } else { ++ /* if frame_size is not set, the number of samples must be ++ * * calculated from the buffer size */ ++ int64_t nb_samples; ++ if (!av_get_bits_per_sample(codec_context->codec_id)) { ++ av_frame_free(&frame); ++ return AVERROR(EINVAL); ++ } ++ nb_samples = (int64_t)(compressed_allocated - output_size) * 8 / ++ (av_get_bits_per_sample(codec_context->codec_id) * ++ codec_context->channels); ++ if (nb_samples >= INT_MAX) { ++ av_frame_free(&frame); ++ return AVERROR(EINVAL); ++ } ++ frame->nb_samples = nb_samples; ++ } ++ ++ /* it is assumed that the samples buffer is large enough based on the ++ * * relevant parameters */ ++ samples_size = av_samples_get_buffer_size(NULL, codec_context->channels, ++ frame->nb_samples, ++ codec_context->sample_fmt, 1); ++ if ((ret = avcodec_fill_audio_frame(frame, codec_context->channels, ++ codec_context->sample_fmt, ++ (const uint8_t *)(temp_raw + current_sample * asset->channels), ++ samples_size, 1)) < 0) { ++ av_frame_free(&frame); ++ return ret; ++ } ++ ++ ret = avcodec_encode_audio2(codec_context, &pkt, frame, &got_packet); ++ output_size += pkt.size; ++ /* free any side data since we cannot return it */ ++ av_packet_free_side_data(&pkt); ++ ++ if (frame && frame->extended_data != frame->data) ++ av_freep(&frame->extended_data); ++ ++ av_frame_free(&frame); + } + + // Shift buffer back +Index: cinelerra-20140710/quicktime/mpeg4.c +=================================================================== +--- cinelerra-20140710.orig/quicktime/mpeg4.c ++++ cinelerra-20140710/quicktime/mpeg4.c +@@ -595,7 +595,7 @@ static int encode(quicktime_t *file, uns + if(!codec->encode_initialized[current_field]) + { + // Encore section +- if(codec->ffmpeg_id == CODEC_ID_MPEG4 && codec->use_encore) ++ if(codec->ffmpeg_id == AV_CODEC_ID_MPEG4 && codec->use_encore) + { + codec->encode_initialized[current_field] = 1; + codec->encode_handle[current_field] = encode_handle++; +@@ -647,7 +647,7 @@ static int encode(quicktime_t *file, uns + context->width = width_i; + context->height = height_i; + context->gop_size = codec->gop_size; +- context->pix_fmt = PIX_FMT_YUV420P; ++ context->pix_fmt = AV_PIX_FMT_YUV420P; + context->bit_rate = codec->bitrate / codec->total_fields; + context->bit_rate_tolerance = codec->bitrate_tolerance; + context->rc_eq = video_rc_eq; +@@ -705,19 +705,19 @@ static int encode(quicktime_t *file, uns + // All the forbidden settings can be extracted from libavcodec/mpegvideo.c of ffmpeg... + + // Copyed from ffmpeg's mpegvideo.c... set 4MV only where it is supported +- if(codec->ffmpeg_id == CODEC_ID_MPEG4 || +- codec->ffmpeg_id == CODEC_ID_H263 || +- codec->ffmpeg_id == CODEC_ID_H263P || +- codec->ffmpeg_id == CODEC_ID_FLV1) ++ if(codec->ffmpeg_id == AV_CODEC_ID_MPEG4 || ++ codec->ffmpeg_id == AV_CODEC_ID_H263 || ++ codec->ffmpeg_id == AV_CODEC_ID_H263P || ++ codec->ffmpeg_id == AV_CODEC_ID_FLV1) + context->flags |= CODEC_FLAG_4MV; + // Not compatible with Win + // context->flags |= CODEC_FLAG_QPEL; + + if(file->cpus > 1 && +- (codec->ffmpeg_id == CODEC_ID_MPEG4 || +- codec->ffmpeg_id == CODEC_ID_MPEG1VIDEO || +- codec->ffmpeg_id == CODEC_ID_MPEG2VIDEO || +- codec->ffmpeg_id == CODEC_ID_H263P )) ++ (codec->ffmpeg_id == AV_CODEC_ID_MPEG4 || ++ codec->ffmpeg_id == AV_CODEC_ID_MPEG1VIDEO || ++ codec->ffmpeg_id == AV_CODEC_ID_MPEG2VIDEO || ++ codec->ffmpeg_id == AV_CODEC_ID_H263P )) + { + context->thread_count = file->cpus; + } +@@ -740,7 +740,7 @@ static int encode(quicktime_t *file, uns + */ + avcodec_open2(context, codec->encoder[current_field], opts); + +- avcodec_get_frame_defaults(&codec->picture[current_field]); ++ av_frame_unref(&codec->picture[current_field]); + + } + } +@@ -891,10 +891,18 @@ static int encode(quicktime_t *file, uns + picture->quality = 0; + picture->pts = vtrack->current_position * quicktime_frame_rate_d(file, track); + picture->key_frame = 0; +- bytes = avcodec_encode_video(context, +- codec->work_buffer, +- codec->buffer_size, +- picture); ++ ++ AVPacket pkt; ++ int ret, got_pkt; ++ av_init_packet(&pkt); ++ pkt.data = codec->work_buffer; ++ pkt.size = codec->buffer_size; ++ ret = avcodec_encode_video2(context, ++ &pkt, ++ picture, &got_pkt); ++ bytes = pkt.size; ++ if(ret < 0 || !got_pkt) return 1; ++ + is_keyframe = context->coded_frame && context->coded_frame->key_frame; + /* + * printf("encode current_position=%d is_keyframe=%d\n", +@@ -1161,7 +1169,7 @@ void quicktime_init_codec_div3(quicktime + QUICKTIME_DIV3, + "DIVX", + "Mike Row Soft MPEG4 Version 3"); +- result->ffmpeg_id = CODEC_ID_MSMPEG4V3; ++ result->ffmpeg_id = AV_CODEC_ID_MSMPEG4V3; + } + + void quicktime_init_codec_div5(quicktime_video_map_t *vtrack) +@@ -1170,7 +1178,7 @@ void quicktime_init_codec_div5(quicktime + QUICKTIME_DX50, + "DIVX", + "Mike Row Soft MPEG4 Version 5"); +- result->ffmpeg_id = CODEC_ID_MPEG4; ++ result->ffmpeg_id = AV_CODEC_ID_MPEG4; + } + + // Mike Rowe Soft MPEG-4 +@@ -1180,7 +1188,7 @@ void quicktime_init_codec_div3lower(quic + QUICKTIME_DIV3_LOWER, + "DIVX", + "Mike Row Soft MPEG4 Version 3"); +- result->ffmpeg_id = CODEC_ID_MSMPEG4V3; ++ result->ffmpeg_id = AV_CODEC_ID_MSMPEG4V3; + } + + void quicktime_init_codec_div3v2(quicktime_video_map_t *vtrack) +@@ -1189,7 +1197,7 @@ void quicktime_init_codec_div3v2(quickti + QUICKTIME_MP42, + "MP42", + "Mike Row Soft MPEG4 Version 2"); +- result->ffmpeg_id = CODEC_ID_MSMPEG4V2; ++ result->ffmpeg_id = AV_CODEC_ID_MSMPEG4V2; + } + + // Generic MPEG-4 +@@ -1199,7 +1207,7 @@ void quicktime_init_codec_divx(quicktime + QUICKTIME_DIVX, + "MPEG-4", + "Generic MPEG Four"); +- result->ffmpeg_id = CODEC_ID_MPEG4; ++ result->ffmpeg_id = AV_CODEC_ID_MPEG4; + result->use_encore = 1; + } + +@@ -1209,7 +1217,7 @@ void quicktime_init_codec_mpg4(quicktime + QUICKTIME_MPG4, + "MPEG-4", + "FFMPEG (msmpeg4)"); +- result->ffmpeg_id = CODEC_ID_MSMPEG4V1; ++ result->ffmpeg_id = AV_CODEC_ID_MSMPEG4V1; + } + + void quicktime_init_codec_dx50(quicktime_video_map_t *vtrack) +@@ -1218,7 +1226,7 @@ void quicktime_init_codec_dx50(quicktime + QUICKTIME_DX50, + "MPEG-4", + "FFMPEG (mpeg4)"); +- result->ffmpeg_id = CODEC_ID_MPEG4; ++ result->ffmpeg_id = AV_CODEC_ID_MPEG4; + } + + // Generic MPEG-4 +@@ -1228,7 +1236,7 @@ void quicktime_init_codec_mp4v(quicktime + QUICKTIME_MP4V, + "MPEG4", + "Generic MPEG Four"); +- result->ffmpeg_id = CODEC_ID_MPEG4; ++ result->ffmpeg_id = AV_CODEC_ID_MPEG4; + // result->use_encore = 1; + } + +@@ -1240,7 +1248,7 @@ void quicktime_init_codec_svq1(quicktime + QUICKTIME_SVQ1, + "Sorenson Version 1", + "From the chearch of codecs of yesterday's sights"); +- result->ffmpeg_id = CODEC_ID_SVQ1; ++ result->ffmpeg_id = AV_CODEC_ID_SVQ1; + } + + void quicktime_init_codec_svq3(quicktime_video_map_t *vtrack) +@@ -1249,7 +1257,7 @@ void quicktime_init_codec_svq3(quicktime + QUICKTIME_SVQ3, + "Sorenson Version 3", + "From the chearch of codecs of yesterday's sights"); +- result->ffmpeg_id = CODEC_ID_SVQ3; ++ result->ffmpeg_id = AV_CODEC_ID_SVQ3; + } + + void quicktime_init_codec_h263(quicktime_video_map_t *vtrack) +@@ -1258,7 +1266,7 @@ void quicktime_init_codec_h263(quicktime + QUICKTIME_H263, + "H.263", + "H.263"); +- result->ffmpeg_id = CODEC_ID_H263; ++ result->ffmpeg_id = AV_CODEC_ID_H263; + } + + void quicktime_init_codec_xvid(quicktime_video_map_t *vtrack) +@@ -1267,7 +1275,7 @@ void quicktime_init_codec_xvid(quicktime + QUICKTIME_XVID, + "XVID", + "FFmpeg MPEG-4"); +- result->ffmpeg_id = CODEC_ID_MPEG4; ++ result->ffmpeg_id = AV_CODEC_ID_MPEG4; + } + + void quicktime_init_codec_dnxhd(quicktime_video_map_t *vtrack) +@@ -1276,7 +1284,7 @@ void quicktime_init_codec_dnxhd(quicktim + QUICKTIME_DNXHD, + "DNXHD", + "DNXHD"); +- result->ffmpeg_id = CODEC_ID_DNXHD; ++ result->ffmpeg_id = AV_CODEC_ID_DNXHD; + } + + // field based MPEG-4 +@@ -1287,7 +1295,7 @@ void quicktime_init_codec_hv60(quicktime + "Dual MPEG-4", + "MPEG 4 with alternating streams every other frame. (Not standardized)"); + result->total_fields = 2; +- result->ffmpeg_id = CODEC_ID_MPEG4; ++ result->ffmpeg_id = AV_CODEC_ID_MPEG4; + } + + +Index: cinelerra-20140710/quicktime/qtffmpeg.c +=================================================================== +--- cinelerra-20140710.orig/quicktime/qtffmpeg.c ++++ cinelerra-20140710/quicktime/qtffmpeg.c +@@ -39,7 +39,7 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg + ptr->height = h; + ptr->ffmpeg_id = ffmpeg_id; + //printf("quicktime_new_ffmpeg 1 %d\n", ptr->ffmpeg_id); +- if(ffmpeg_id == CODEC_ID_SVQ1) ++ if(ffmpeg_id == AV_CODEC_ID_SVQ1) + { + ptr->width_i = quicktime_quantize32(ptr->width); + ptr->height_i = quicktime_quantize32(ptr->height); +@@ -86,10 +86,10 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg + context->extradata_size = avcc->data_size; + } + if(cpus > 1 && +- (ffmpeg_id == CODEC_ID_MPEG4 || +- ffmpeg_id == CODEC_ID_MPEG1VIDEO || +- ffmpeg_id == CODEC_ID_MPEG2VIDEO || +- ffmpeg_id == CODEC_ID_H263P )) ++ (ffmpeg_id == AV_CODEC_ID_MPEG4 || ++ ffmpeg_id == AV_CODEC_ID_MPEG1VIDEO || ++ ffmpeg_id == AV_CODEC_ID_MPEG2VIDEO || ++ ffmpeg_id == AV_CODEC_ID_H263P )) + { + context->thread_count = cpus; + } +@@ -224,16 +224,16 @@ static int get_chroma_factor(quicktime_f + { + switch(ffmpeg->decoder_context[current_field]->pix_fmt) + { +- case PIX_FMT_YUV420P: ++ case AV_PIX_FMT_YUV420P: + return 4; + break; +- case PIX_FMT_YUYV422: ++ case AV_PIX_FMT_YUYV422: + return 2; + break; +- case PIX_FMT_YUV422P: ++ case AV_PIX_FMT_YUV422P: + return 2; + break; +- case PIX_FMT_YUV410P: ++ case AV_PIX_FMT_YUV410P: + return 9; + break; + default: +@@ -277,7 +277,7 @@ int quicktime_ffmpeg_decode(quicktime_ff + //printf("quicktime_ffmpeg_decode 1 %d\n", ffmpeg->last_frame[current_field]); + + if(ffmpeg->last_frame[current_field] == -1 && +- ffmpeg->ffmpeg_id != CODEC_ID_H264) ++ ffmpeg->ffmpeg_id != AV_CODEC_ID_H264) + { + int current_frame = vtrack->current_position; + // For certain codecs, +@@ -328,7 +328,7 @@ int quicktime_ffmpeg_decode(quicktime_ff + // For MPEG-4, get another keyframe before first keyframe. + // The Sanyo tends to glitch with only 1 keyframe. + // Not enough memory. +- if( 0 /* frame1 > 0 && ffmpeg->ffmpeg_id == CODEC_ID_MPEG4 */) ++ if( 0 /* frame1 > 0 && ffmpeg->ffmpeg_id == AV_CODEC_ID_MPEG4 */) + { + do + { +@@ -423,16 +423,16 @@ int quicktime_ffmpeg_decode(quicktime_ff + // Hopefully this setting will be left over if the cache was used. + switch(ffmpeg->decoder_context[current_field]->pix_fmt) + { +- case PIX_FMT_YUV420P: ++ case AV_PIX_FMT_YUV420P: + input_cmodel = BC_YUV420P; + break; +- case PIX_FMT_YUYV422: ++ case AV_PIX_FMT_YUYV422: + input_cmodel = BC_YUV422; + break; +- case PIX_FMT_YUV422P: ++ case AV_PIX_FMT_YUV422P: + input_cmodel = BC_YUV422P; + break; +- case PIX_FMT_YUV410P: ++ case AV_PIX_FMT_YUV410P: + input_cmodel = BC_YUV9P; + break; + default: +Index: cinelerra-20140710/quicktime/qth264.c +=================================================================== +--- cinelerra-20140710.orig/quicktime/qth264.c ++++ cinelerra-20140710/quicktime/qth264.c +@@ -370,7 +370,7 @@ static int decode(quicktime_t *file, uns + if(!codec->decoder) codec->decoder = quicktime_new_ffmpeg( + file->cpus, + codec->total_fields, +- CODEC_ID_H264, ++ AV_CODEC_ID_H264, + width, + height, + stsd_table); +Index: cinelerra-20140710/quicktime/wma.c +=================================================================== +--- cinelerra-20140710.orig/quicktime/wma.c ++++ cinelerra-20140710/quicktime/wma.c +@@ -193,15 +193,38 @@ printf("decode 2 %x %llx %llx\n", chunk_ + codec->packet_buffer, + chunk_size); + #else +- bytes_decoded = AVCODEC_MAX_AUDIO_FRAME_SIZE; + AVPacket pkt; + av_init_packet( &pkt ); + pkt.data = codec->packet_buffer; + pkt.size = chunk_size; +- result = avcodec_decode_audio3(codec->decoder_context, +- (int16_t*)(codec->work_buffer + codec->output_size * sample_size), +- &bytes_decoded, ++ AVFrame *frame = av_frame_alloc(); ++ int got_frame = 0; ++ ++ result = avcodec_decode_audio4(codec->decoder_context, ++ frame, &got_frame, + &pkt); ++ ++ if(result >= 0 && got_frame) ++ { ++ int ch, plane_size; ++ int planar = av_sample_fmt_is_planar(codec->decoder_context->sample_fmt); ++ int data_size = av_samples_get_buffer_size(&plane_size, codec->decoder_context->channels, ++ frame->nb_samples, ++ codec->decoder_context->sample_fmt, 1); ++ memcpy(codec->work_buffer + codec->output_size * sample_size, frame->extended_data[0], plane_size); ++ ++ if (planar && codec->decoder_context->channels > 1) { ++ uint8_t *out = ((uint8_t *)(codec->work_buffer + codec->output_size * sample_size)) + plane_size; ++ for (ch = 1; ch < codec->decoder_context->channels; ch++) { ++ memcpy(out, frame->extended_data[ch], plane_size); ++ out += plane_size; ++ } ++ } ++ bytes_decoded = data_size; ++ } else { ++ bytes_decoded = 0; ++ } ++ av_frame_free(&frame); + #endif + + pthread_mutex_unlock(&ffmpeg_lock); +@@ -298,7 +321,7 @@ void quicktime_init_codec_wmav1(quicktim + codec_base->title = "Win Media Audio 1"; + codec_base->desc = "Win Media Audio 1"; + codec_base->wav_id = 0x160; +- codec->ffmpeg_id = CODEC_ID_WMAV1; ++ codec->ffmpeg_id = AV_CODEC_ID_WMAV1; + } + + +@@ -313,5 +336,5 @@ void quicktime_init_codec_wmav2(quicktim + codec_base->title = "Win Media Audio 2"; + codec_base->desc = "Win Media Audio 2"; + codec_base->wav_id = 0x161; +- codec->ffmpeg_id = CODEC_ID_WMAV2; ++ codec->ffmpeg_id = AV_CODEC_ID_WMAV2; + } +Index: cinelerra-20140710/cinelerra/fileyuv.C +=================================================================== +--- cinelerra-20140710.orig/cinelerra/fileyuv.C ++++ cinelerra-20140710/cinelerra/fileyuv.C +@@ -196,7 +196,7 @@ int FileYUV::write_frames(VFrame ***laye + return stream->write_frame_raw(frame->get_data(), frame_size); + + // decode and write an encoded frame +- if (FFMPEG::codec_id(incoming_asset->vcodec) != CODEC_ID_NONE) ++ if (FFMPEG::codec_id(incoming_asset->vcodec) != AV_CODEC_ID_NONE) + { + if (! ffmpeg) + { +@@ -306,7 +306,7 @@ int FileYUV::can_copy_from(Edit *edit, i + if (edit->asset->format == FILE_YUV) return 1; + + // if FFMPEG can decode it, we'll accept it +- if (FFMPEG::codec_id(edit->asset->vcodec) != CODEC_ID_NONE) return 1; ++ if (FFMPEG::codec_id(edit->asset->vcodec) != AV_CODEC_ID_NONE) return 1; + + incoming_asset = 0; + diff --git a/media-video/cinelerra/files/cinelerra-implicit_decls.patch b/media-video/cinelerra/files/cinelerra-implicit_decls.patch new file mode 100644 index 000000000000..c806715e8c44 --- /dev/null +++ b/media-video/cinelerra/files/cinelerra-implicit_decls.patch @@ -0,0 +1,36 @@ +Index: CinelerraCV-2.3/quicktime/graphics.c +=================================================================== +--- CinelerraCV-2.3.orig/quicktime/graphics.c ++++ CinelerraCV-2.3/quicktime/graphics.c +@@ -1,5 +1,6 @@ + #include "graphics.h" + ++#include <stdlib.h> + #include <string.h> + + /* Graphics acceleration routines */ +Index: CinelerraCV-2.3/quicktime/libmjpeg.c +=================================================================== +--- CinelerraCV-2.3.orig/quicktime/libmjpeg.c ++++ CinelerraCV-2.3/quicktime/libmjpeg.c +@@ -17,6 +17,8 @@ + + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> ++#include <strings.h> + #include "colormodels.h" + #include "libmjpeg.h" + +Index: CinelerraCV-2.3/quicktime/qtpng.c +=================================================================== +--- CinelerraCV-2.3.orig/quicktime/qtpng.c ++++ CinelerraCV-2.3/quicktime/qtpng.c +@@ -1,6 +1,7 @@ + #include "colormodels.h" + #include "funcprotos.h" + #include <png.h> ++#include <string.h> + #include "quicktime.h" + #include "qtpng.h" + diff --git a/media-video/cinelerra/files/cinelerra-includes.patch b/media-video/cinelerra/files/cinelerra-includes.patch new file mode 100644 index 000000000000..45ac200310da --- /dev/null +++ b/media-video/cinelerra/files/cinelerra-includes.patch @@ -0,0 +1,12 @@ +Index: CinelerraCV-2.3/cinelerra/audiodevice.C +=================================================================== +--- CinelerraCV-2.3.orig/cinelerra/audiodevice.C ++++ CinelerraCV-2.3/cinelerra/audiodevice.C +@@ -19,6 +19,7 @@ + * + */ + ++#include <cassert> + #ifdef HAVE_FIREWIRE + #include "audio1394.h" + #endif diff --git a/media-video/cinelerra/files/cinelerra-libav9.patch b/media-video/cinelerra/files/cinelerra-libav9.patch new file mode 100644 index 000000000000..47a4d6f231e1 --- /dev/null +++ b/media-video/cinelerra/files/cinelerra-libav9.patch @@ -0,0 +1,93 @@ +diff -urN cinelerra-20120707/cinelerra/ffmpeg.C /tmp/cinelerra-20120707/cinelerra/ffmpeg.C +--- cinelerra-20120707/cinelerra/ffmpeg.C 2013-06-22 18:07:43.632978553 +0200 ++++ /tmp/cinelerra-20120707/cinelerra/ffmpeg.C 2013-06-22 18:07:21.668979334 +0200 +@@ -32,9 +32,9 @@ + return 1; + } + +- context = avcodec_alloc_context(); ++ context = avcodec_alloc_context3(NULL); + +- if (avcodec_open(context, codec)) { ++ if (avcodec_open2(context, codec, NULL)) { + printf("FFMPEG::init avcodec_open() failed\n"); + } + +diff -urN cinelerra-20120707/cinelerra/fileac3.C /tmp/cinelerra-20120707/cinelerra/fileac3.C +--- cinelerra-20120707/cinelerra/fileac3.C 2013-06-22 18:07:43.632978553 +0200 ++++ /tmp/cinelerra-20120707/cinelerra/fileac3.C 2013-06-22 18:07:21.668979334 +0200 +@@ -91,11 +91,11 @@ + eprintf("codec not found.\n"); + return 1; + } +- codec_context = avcodec_alloc_context(); ++ codec_context = avcodec_alloc_context3(NULL); + codec_context->bit_rate = asset->ac3_bitrate * 1000; + codec_context->sample_rate = asset->sample_rate; + codec_context->channels = asset->channels; +- if(avcodec_open(codec_context, codec)) ++ if(avcodec_open2(codec_context, codec, NULL)) + { + eprintf("failed to open codec.\n"); + return 1; +diff -urN cinelerra-20120707/quicktime/mpeg4.c /tmp/cinelerra-20120707/quicktime/mpeg4.c +--- cinelerra-20120707/quicktime/mpeg4.c 2013-06-22 18:07:43.633978553 +0200 ++++ /tmp/cinelerra-20120707/quicktime/mpeg4.c 2013-06-22 18:07:21.690979334 +0200 +@@ -642,7 +642,7 @@ + return 1; + } + +- codec->encoder_context[current_field] = avcodec_alloc_context(); ++ codec->encoder_context[current_field] = avcodec_alloc_context3(NULL); + AVCodecContext *context = codec->encoder_context[current_field]; + + context->width = width_i; +@@ -676,8 +676,6 @@ + context->error_resilience = FF_ER_CAREFUL; + #elif LIBAVCODEC_VERSION_INT < ((54<<16)+(0<<8)+0) + context->error_recognition = FF_ER_CAREFUL; +-#else +- context->err_recognition |= AV_EF_CAREFUL; + #endif + context->error_concealment = 3; + context->frame_skip_cmp = FF_CMP_DCTMAX; +diff -urN cinelerra-20120707/quicktime/qtffmpeg.c /tmp/cinelerra-20120707/quicktime/qtffmpeg.c +--- cinelerra-20120707/quicktime/qtffmpeg.c 2013-06-22 18:07:43.633978553 +0200 ++++ /tmp/cinelerra-20120707/quicktime/qtffmpeg.c 2013-06-22 18:07:21.690979334 +0200 +@@ -67,7 +67,7 @@ + return 0; + } + +- AVCodecContext *context = ptr->decoder_context[i] = avcodec_alloc_context(); ++ AVCodecContext *context = ptr->decoder_context[i] = avcodec_alloc_context3(NULL); + static char fake_data[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + context->width = ptr->width_i; + context->height = ptr->height_i; +@@ -93,8 +93,8 @@ + { + context->thread_count = cpus; + } +- if(avcodec_open(context, +- ptr->decoder[i]) < 0) ++ if(avcodec_open2(context, ++ ptr->decoder[i], NULL) < 0) + { + printf("quicktime_new_ffmpeg: avcodec_open failed.\n"); + quicktime_delete_ffmpeg(ptr); +diff -urN cinelerra-20120707/quicktime/wma.c /tmp/cinelerra-20120707/quicktime/wma.c +--- cinelerra-20120707/quicktime/wma.c 2013-06-22 18:07:43.634978553 +0200 ++++ /tmp/cinelerra-20120707/quicktime/wma.c 2013-06-22 18:07:21.690979334 +0200 +@@ -76,10 +76,10 @@ + printf("init_decode: avcodec_find_decoder returned NULL.\n"); + return 1; + } +- codec->decoder_context = avcodec_alloc_context(); ++ codec->decoder_context = avcodec_alloc_context3(NULL); + codec->decoder_context->sample_rate = trak->mdia.minf.stbl.stsd.table[0].sample_rate; + codec->decoder_context->channels = track_map->channels; +- if(avcodec_open(codec->decoder_context, codec->decoder) < 0) ++ if(avcodec_open2(codec->decoder_context, codec->decoder, NULL) < 0) + { + printf("init_decode: avcodec_open failed.\n"); + return 1; + diff --git a/media-video/cinelerra/files/cinelerra-pngtoh.patch b/media-video/cinelerra/files/cinelerra-pngtoh.patch new file mode 100644 index 000000000000..81a8432b8729 --- /dev/null +++ b/media-video/cinelerra/files/cinelerra-pngtoh.patch @@ -0,0 +1,15 @@ +https://bugs.gentoo.org/show_bug.cgi?id=526118 +http://bugs.cinelerra-cv.org/ticket/1005 + +Author: Bernd Feige + +--- guicast/pngtoh.c 2015-01-29 13:41:01 +0000 ++++ guicast/pngtoh.c 2015-01-29 13:41:07 +0000 +@@ -148,4 +148,6 @@ + fprintf(out, "};\n\n#endif\n"); + fclose(out); + } ++ ++ return 0; + } + diff --git a/media-video/cinelerra/files/cinelerra-putbits-gcc52.patch b/media-video/cinelerra/files/cinelerra-putbits-gcc52.patch new file mode 100644 index 000000000000..646db9f25f05 --- /dev/null +++ b/media-video/cinelerra/files/cinelerra-putbits-gcc52.patch @@ -0,0 +1,29 @@ +https://bugs.gentoo.org/show_bug.cgi?id=562208 + +Index: cinelerra-20140710/toolame-02l/bitstream.c +=================================================================== +--- cinelerra-20140710.orig/toolame-02l/bitstream.c ++++ cinelerra-20140710/toolame-02l/bitstream.c +@@ -198,9 +198,6 @@ void put1bit (Bit_stream_struc * bs, int + } + + /*write N bits into the bit stream */ +-#if !defined(__clang__) +-INLINE +-#endif /* not __clang__ */ + void putbits (Bit_stream_struc * bs, unsigned int val, int N) + { + register int j = N; +Index: cinelerra-20140710/toolame-02l/bitstream.h +=================================================================== +--- cinelerra-20140710.orig/toolame-02l/bitstream.h ++++ cinelerra-20140710/toolame-02l/bitstream.h +@@ -9,7 +9,7 @@ unsigned int get1bit (Bit_stream_struc * + void put1bit (Bit_stream_struc *, int); + unsigned long look_ahead (Bit_stream_struc *, int); + unsigned long getbits (Bit_stream_struc *, int); +-INLINE void putbits (Bit_stream_struc *, unsigned int, int); ++void putbits (Bit_stream_struc *, unsigned int, int); + void byte_ali_putbits (Bit_stream_struc *, unsigned int, int); + unsigned long byte_ali_getbits (Bit_stream_struc *, int); + unsigned long sstell (Bit_stream_struc *); diff --git a/media-video/cinelerra/metadata.xml b/media-video/cinelerra/metadata.xml new file mode 100644 index 000000000000..17f11a20c014 --- /dev/null +++ b/media-video/cinelerra/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>media-video@gentoo.org</email> + <name>Gentoo Video project</name> + </maintainer> +</pkgmetadata> |