You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-plugins/vdr-pcd/files/vdr-pcd-0.9-ffmpeg-1.patch

42 lines
1.1 KiB

diff -urN pcd-0.9.old/mpeg.c pcd-0.9/mpeg.c
--- pcd-0.9.old/mpeg.c 2013-06-17 21:11:54.125454721 +0200
+++ pcd-0.9/mpeg.c 2013-06-17 21:12:15.325453967 +0200
@@ -44,7 +44,6 @@
bufferSize = 0;
mpegSize = 0;
- avcodec_init();
avcodec_register_all();
if (!(avCodec = avcodec_find_encoder(CODEC_ID_MPEG2VIDEO))) {
@@ -52,7 +51,7 @@
return;
}
- avContext = avcodec_alloc_context();
+ avContext = avcodec_alloc_context3(NULL);
avFrame = avcodec_alloc_frame();
avContext->bit_rate = 400000;
@@ -63,7 +62,7 @@
avContext->flags |= CODEC_FLAG_QSCALE;
avContext->pix_fmt = PIX_FMT_YUV420P;
- if (avcodec_open(avContext, avCodec) < 0) {
+ if (avcodec_open2(avContext, avCodec, NULL) < 0) {
dsyslog("PCD: Can't open codec");
return;
}
diff -urN pcd-0.9.old/mpeg.h pcd-0.9/mpeg.h
--- pcd-0.9.old/mpeg.h 2013-06-17 21:11:54.125454721 +0200
+++ pcd-0.9/mpeg.h 2013-06-17 21:13:15.595451823 +0200
@@ -25,7 +25,7 @@
#include <vdr/tools.h>
extern "C" {
-#include <ffmpeg/avcodec.h>
+#include <libavcodec/avcodec.h>
};
#define TMP_WIDTH 768