On 27.08.2013 12:50, Andreas Tille wrote: > Hi, > > I checked this and can confirm that the problem occures in an unstable > chroot with the current version in Debian and the latest upstream (in > SVN). It seems to be connected to a recent change in libav* - any hint > would be welcome.
Yes, the recent libavcodec removed some more deprecated functions and your source code needs some adaptation. Fortunately, those 3 functions are easy to convert, see the attached patch. Note that there is another deprecated function, avcodec_encode_video, which may be (or will be) removed in a later libav release. Cheers, Andreas
--- amide-1.0.1.orig/src/mpeg_encode.c
+++ amide-1.0.1/src/mpeg_encode.c
@@ -212,7 +212,7 @@ gboolean avcodec_initialized=FALSE;
static void mpeg_encoding_init(void) {
if (!avcodec_initialized) {
/* must be called before using avcodec lib */
- avcodec_init();
+ avcodec_register_all();
/* register all the codecs */
avcodec_register_all();
@@ -261,7 +261,7 @@ gpointer mpeg_encode_setup(gchar * outpu
return NULL;
}
- encode->context = avcodec_alloc_context();
+ encode->context = avcodec_alloc_context3(NULL);
if (!encode->context) {
g_warning("couldn't allocate memory for encode->context");
encode_free(encode);
@@ -299,7 +299,7 @@ gpointer mpeg_encode_setup(gchar * outpu
encode->context->trellis=2; /* turn trellis quantization on */
/* open it */
- if (avcodec_open(encode->context, encode->codec) < 0) {
+ if (avcodec_open2(encode->context, encode->codec, NULL) < 0) {
g_warning("could not open codec");
encode_free(encode);
return NULL;
signature.asc
Description: OpenPGP digital signature

