synfig: revbump for ffmpeg6 and mlt7
This commit is contained in:
parent
576ad9c4e6
commit
998d6c0d02
|
@ -0,0 +1,71 @@
|
||||||
|
--- a/src/modules/mod_libavcodec/trgt_av.cpp 2022-10-25 09:14:12.000000000 -0400
|
||||||
|
+++ b/src/modules/mod_libavcodec/trgt_av.cpp 2023-05-05 21:34:17.899194559 -0400
|
||||||
|
@@ -38,6 +41,7 @@
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
|
||||||
|
+# include <libavcodec/avcodec.h>
|
||||||
|
# include <libavformat/avformat.h>
|
||||||
|
#elif defined(HAVE_AVFORMAT_H)
|
||||||
|
# include <avformat.h>
|
||||||
|
@@ -155,11 +156,11 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
bool open_video_stream() {
|
||||||
|
- if (avcodec_open2(video_context, NULL, NULL) < 0) {
|
||||||
|
+ if (avcodec_open2(video_context, nullptr, nullptr) < 0) {
|
||||||
|
synfig::error("Target_LibAVCodec: could not open video codec");
|
||||||
|
// seems the calling of avcodec_free_context after error will cause crash
|
||||||
|
// so just forget about this context
|
||||||
|
- video_context = NULL;
|
||||||
|
+ video_context = nullptr;
|
||||||
|
close();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@@ -234,15 +235,21 @@
|
||||||
|
close();
|
||||||
|
|
||||||
|
if (!av_registered) {
|
||||||
|
+#if LIBAVCODEC_VERSION_MAJOR < 58 // FFMPEG < 4.0
|
||||||
|
av_register_all();
|
||||||
|
+#endif
|
||||||
|
av_registered = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// guess format
|
||||||
|
- AVOutputFormat *format = av_guess_format(NULL, filename.c_str(), NULL);
|
||||||
|
+#if LIBAVCODEC_VERSION_MAJOR < 59 // FFMPEG < 5.0
|
||||||
|
+ AVOutputFormat* format = av_guess_format(nullptr, filename.c_str(), nullptr);
|
||||||
|
+#else
|
||||||
|
+ const AVOutputFormat* format = av_guess_format(nullptr, filename.c_str(), nullptr);
|
||||||
|
+#endif
|
||||||
|
if (!format) {
|
||||||
|
synfig::warning("Target_LibAVCodec: unable to guess the output format, defaulting to MPEG");
|
||||||
|
- format = av_guess_format("mpeg", NULL, NULL);
|
||||||
|
+ format = av_guess_format("mpeg", nullptr, nullptr);
|
||||||
|
}
|
||||||
|
if (!format) {
|
||||||
|
synfig::error("Target_LibAVCodec: unable to find 'mpeg' output format");
|
||||||
|
@@ -254,6 +261,7 @@
|
||||||
|
context = avformat_alloc_context();
|
||||||
|
assert(context);
|
||||||
|
context->oformat = format;
|
||||||
|
+#if LIBAVCODEC_VERSION_MAJOR < 58 // FFMPEG < 4.0
|
||||||
|
if (filename.size() + 1 > sizeof(context->filename)) {
|
||||||
|
synfig::error(
|
||||||
|
"Target_LibAVCodec: filename too long, max length is %d, filename is '%s'",
|
||||||
|
@@ -263,6 +271,14 @@
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
memcpy(context->filename, filename.c_str(), filename.size() + 1);
|
||||||
|
+#else
|
||||||
|
+ context->url = av_strndup(filename.c_str(), filename.size());
|
||||||
|
+ if (!context->url) {
|
||||||
|
+ synfig::error("Target_LibAVCodec: cannot allocate space for filename");
|
||||||
|
+ close();
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
packet = av_packet_alloc();
|
||||||
|
assert(packet);
|
|
@ -2,12 +2,12 @@
|
||||||
# Should be kept in sync with 'synfigstudio' and 'ETL'
|
# Should be kept in sync with 'synfigstudio' and 'ETL'
|
||||||
pkgname=synfig
|
pkgname=synfig
|
||||||
version=1.4.5
|
version=1.4.5
|
||||||
revision=1
|
revision=2
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--with-boost-libdir=${XBPS_CROSS_BASE}/usr/lib"
|
configure_args="--with-boost-libdir=${XBPS_CROSS_BASE}/usr/lib"
|
||||||
hostmakedepends="boost-build ImageMagick pkg-config intltool"
|
hostmakedepends="boost-build ImageMagick pkg-config intltool"
|
||||||
makedepends="ETL gettext-devel libxml++-devel mlt-devel libmagick-devel
|
makedepends="ETL gettext-devel libxml++-devel mlt7-devel libmagick-devel
|
||||||
libmng-devel boost-build boost-devel libopenexr-devel ffmpeg-devel"
|
libmng-devel boost-build boost-devel libopenexr-devel ffmpeg6-devel"
|
||||||
depends="ImageMagick"
|
depends="ImageMagick"
|
||||||
short_desc="CLI 2D vector and timeline-based animation software"
|
short_desc="CLI 2D vector and timeline-based animation software"
|
||||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||||
|
@ -20,7 +20,7 @@ CXXFLAGS="-std=c++11 -DHAVE_LOCALE_H=1"
|
||||||
|
|
||||||
synfig-devel_package() {
|
synfig-devel_package() {
|
||||||
depends="${sourcepkg}>=${version}_${revision}
|
depends="${sourcepkg}>=${version}_${revision}
|
||||||
libopenexr-devel libxml++-devel mlt-devel"
|
libopenexr-devel libxml++-devel mlt7-devel"
|
||||||
short_desc+=" - development files"
|
short_desc+=" - development files"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vmove usr/bin/synfig-config
|
vmove usr/bin/synfig-config
|
||||||
|
|
Loading…
Reference in New Issue