On 03.05.2014 13:55, Eugen Dedu wrote:
On 03/05/14 18:02, Reinhard Tartler wrote:
tags 739439 + patch
tags 739439 + pending
thanks
Dear maintainer,
I've prepared an NMU for opal (versioned as 3.12.8~dfsg-1.1) and intend
to upload it to experimental soon. I'm not uploading because I thinking
about how to workaround #728452.
Please share any concerns that you have about that patch with me.
Thank you very much Reinhard for the patch and for testing, and sorry
for not having had the time to do it.
I looked at the patch and it seems fine to me.
But why do you work on opal 3.12.8? It is not maintained anymore, and
current version is 3.14. I plan to package 3.14 in the next months and
replace 3.12.8, which thus will never hit unstable/testing. So better
to patch 3.10.10 version.
Okay, I'm going to upload the attached patch then to unstable, which is
basically a the same patch just for 3.10.
Best,
Reinahrd
diff -Nru opal-3.10.10~dfsg/debian/changelog opal-3.10.10~dfsg/debian/changelog
--- opal-3.10.10~dfsg/debian/changelog 2013-09-13 07:21:36.000000000 -0400
+++ opal-3.10.10~dfsg/debian/changelog 2014-05-03 15:52:10.000000000 -0400
@@ -1,3 +1,10 @@
+opal (3.10.10~dfsg-2.2) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Add libav10.patch to fix FTBFS with Libav10 (Closes: #739439)
+
+ -- Reinhard Tartler <siret...@tauware.de> Sat, 03 May 2014 15:51:57 -0400
+
opal (3.10.10~dfsg-2.1) unstable; urgency=low
* Non-maintainer upload.
diff -Nru opal-3.10.10~dfsg/debian/patches/libav10.patch opal-3.10.10~dfsg/debian/patches/libav10.patch
--- opal-3.10.10~dfsg/debian/patches/libav10.patch 1969-12-31 19:00:00.000000000 -0500
+++ opal-3.10.10~dfsg/debian/patches/libav10.patch 2014-05-03 15:44:03.000000000 -0400
@@ -0,0 +1,208 @@
+Description: Fix compilation against libav10
+Author: Reinhard Tartler <siret...@tauware.de>
+Bug-Debian: http://bugs.debian.org/739439
+
+--- a/plugins/video/H.263-1998/h263-1998.cxx
++++ b/plugins/video/H.263-1998/h263-1998.cxx
+@@ -94,7 +94,7 @@ static struct StdSizes {
+ { CIF16_WIDTH, CIF16_HEIGHT, PLUGINCODEC_CIF16_MPI },
+ };
+
+-static FFMPEGLibrary FFMPEGLibraryInstance(CODEC_ID_H263P);
++static FFMPEGLibrary FFMPEGLibraryInstance(AV_CODEC_ID_H263P);
+
+
+ /////////////////////////////////////////////////////////////////////////////
+@@ -203,7 +203,7 @@ H263_Base_EncoderContext::~H263_Base_Enc
+ PTRACE(4, m_prefix, "Encoder closed");
+ }
+
+-bool H263_Base_EncoderContext::Init(CodecID codecId)
++bool H263_Base_EncoderContext::Init(AVCodecID codecId)
+ {
+ PTRACE(5, m_prefix, "Opening encoder");
+
+@@ -589,7 +589,7 @@ void H263_RFC2190_EncoderContext::RTPCal
+
+ bool H263_RFC2190_EncoderContext::Init()
+ {
+- if (!H263_Base_EncoderContext::Init(CODEC_ID_H263))
++ if (!H263_Base_EncoderContext::Init(AV_CODEC_ID_H263))
+ return false;
+
+ #if LIBAVCODEC_RTP_MODE
+@@ -632,7 +632,7 @@ H263_RFC2429_EncoderContext::~H263_RFC24
+
+ bool H263_RFC2429_EncoderContext::Init()
+ {
+- return H263_Base_EncoderContext::Init(CODEC_ID_H263P);
++ return H263_Base_EncoderContext::Init(AV_CODEC_ID_H263P);
+ }
+
+
+@@ -656,7 +656,7 @@ H263_Base_DecoderContext::H263_Base_Deco
+ if (!FFMPEGLibraryInstance.Load())
+ return;
+
+- if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(CODEC_ID_H263)) == NULL) {
++ if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(AV_CODEC_ID_H263)) == NULL) {
+ PTRACE(1, m_prefix, "Codec not found for decoder");
+ return;
+ }
+--- a/plugins/video/H.264/h264-x264.cxx
++++ b/plugins/video/H.264/h264-x264.cxx
+@@ -105,7 +105,7 @@ static struct PluginCodec_information Li
+
+ ///////////////////////////////////////////////////////////////////////////////
+
+-FFMPEGLibrary FFMPEGLibraryInstance(CODEC_ID_H264);
++FFMPEGLibrary FFMPEGLibraryInstance(AV_CODEC_ID_H264);
+
+ PLUGINCODEC_CONTROL_LOG_FUNCTION_DEF
+
+@@ -1065,17 +1065,17 @@ class MyDecoder : public PluginCodec<MY_
+ allows you to fail the create operation (return false), which cannot
+ be done in the normal C++ constructor. */
+
+- if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(CODEC_ID_H264)) == NULL)
++ if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(AV_CODEC_ID_H264)) == NULL)
+ return false;
+
+ if ((m_context = FFMPEGLibraryInstance.AvcodecAllocContext(m_codec)) == NULL)
+ return false;
+
+ m_context->workaround_bugs = FF_BUG_AUTODETECT;
+- m_context->idct_algo = FF_IDCT_H264;
++ m_context->idct_algo = FF_IDCT_AUTO;
+ m_context->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
+ m_context->flags = CODEC_FLAG_INPUT_PRESERVED | CODEC_FLAG_EMU_EDGE;
+- m_context->flags2 = CODEC_FLAG2_SKIP_RD |
++ m_context->flags2 =
+ #ifdef CODEC_FLAG2_DROP_FRAME_TIMECODE
+ CODEC_FLAG2_DROP_FRAME_TIMECODE |
+ #endif
+--- a/plugins/video/MPEG4-ffmpeg/mpeg4.cxx
++++ b/plugins/video/MPEG4-ffmpeg/mpeg4.cxx
+@@ -205,7 +205,7 @@ const static struct mpeg4_resolution {
+ { 0 }
+ };
+
+-FFMPEGLibrary FFMPEGLibraryInstance(CODEC_ID_MPEG4);
++FFMPEGLibrary FFMPEGLibraryInstance(AV_CODEC_ID_MPEG4);
+
+
+ static bool mpeg4IsIframe (BYTE * frameBuffer, unsigned int frameLen )
+@@ -688,7 +688,7 @@ void MPEG4EncoderContext::ResizeEncoding
+
+ bool MPEG4EncoderContext::OpenCodec()
+ {
+- if((m_avcodec = FFMPEGLibraryInstance.AvcodecFindEncoder(CODEC_ID_MPEG4)) == NULL){
++ if((m_avcodec = FFMPEGLibraryInstance.AvcodecFindEncoder(AV_CODEC_ID_MPEG4)) == NULL){
+ PTRACE(1, "MPEG4", "Encoder not found");
+ return false;
+ }
+@@ -1390,7 +1390,7 @@ void MPEG4DecoderContext::ResizeDecoding
+
+ bool MPEG4DecoderContext::OpenCodec()
+ {
+- if ((m_avcodec = FFMPEGLibraryInstance.AvcodecFindDecoder(CODEC_ID_MPEG4)) == NULL) {
++ if ((m_avcodec = FFMPEGLibraryInstance.AvcodecFindDecoder(AV_CODEC_ID_MPEG4)) == NULL) {
+ PTRACE(1, "MPEG4", "Decoder not found for encoder");
+ return false;
+ }
+--- a/plugins/video/H.263-1998/h263-1998.h
++++ b/plugins/video/H.263-1998/h263-1998.h
+@@ -115,7 +115,7 @@ class H263_Base_EncoderContext
+ virtual ~H263_Base_EncoderContext();
+
+ virtual bool Init() = 0;
+- virtual bool Init(CodecID codecId);
++ virtual bool Init(AVCodecID codecId);
+
+ virtual bool SetOptions(const char * const * options);
+ virtual void SetOption(const char * option, const char * value);
+--- a/plugins/video/common/dyna.cxx
++++ b/plugins/video/common/dyna.cxx
+@@ -217,14 +217,14 @@ static void logCallbackFFMPEG(void * avc
+ #endif
+
+
+-FFMPEGLibrary::FFMPEGLibrary(CodecID codec)
++FFMPEGLibrary::FFMPEGLibrary(AVCodecID codec)
+ {
+ m_codec = codec;
+- if (m_codec==CODEC_ID_H264)
++ if (m_codec==AV_CODEC_ID_H264)
+ snprintf( m_codecString, sizeof(m_codecString), "H264");
+- if (m_codec==CODEC_ID_H263P)
++ if (m_codec==AV_CODEC_ID_H263P)
+ snprintf( m_codecString, sizeof(m_codecString), "H263+");
+- if (m_codec==CODEC_ID_MPEG4)
++ if (m_codec==AV_CODEC_ID_MPEG4)
+ snprintf( m_codecString, sizeof(m_codecString), "MPEG4");
+ m_isLoadedOK = false;
+ }
+@@ -268,12 +268,12 @@ bool FFMPEGLibrary::Load()
+ return true;
+ }
+
+-AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum CodecID id)
++AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum AVCodecID id)
+ {
+ return avcodec_find_encoder(id);
+ }
+
+-AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum CodecID id)
++AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum AVCodecID id)
+ {
+ WaitAndSignal m(processLock);
+
+@@ -308,13 +308,18 @@ int FFMPEGLibrary::AvcodecClose(AVCodecC
+ return avcodec_close(ctx);
+ }
+
++#undef FFMAX
++#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
+ int FFMPEGLibrary::AvcodecEncodeVideo(AVCodecContext *ctx, BYTE *buf, int buf_size, const AVFrame *pict)
+ {
++ AVPacket pkt = { 0 };
++ int ret, got_output;
+ int res;
+
+- res = avcodec_encode_video(ctx, buf, buf_size, pict);
++ ret = avcodec_encode_video2(ctx, &pkt, pict, &got_output);
+
+- PTRACE(6, m_codecString, "DYNA\tEncoded into " << res << " bytes, max " << buf_size);
++ PTRACE(6, m_codecString, "DYNA\tEncoded into " << ret << " bytes, max " << buf_size);
++ memcpy(buf, pkt.data, FFMAX(pkt.size, buf_size));
+ return res;
+ }
+
+--- a/plugins/video/common/dyna.h
++++ b/plugins/video/common/dyna.h
+@@ -88,13 +88,13 @@ class DynaLink
+ class FFMPEGLibrary
+ {
+ public:
+- FFMPEGLibrary(CodecID codec);
++ FFMPEGLibrary(AVCodecID codec);
+ ~FFMPEGLibrary();
+
+ bool Load();
+
+- AVCodec *AvcodecFindEncoder(enum CodecID id);
+- AVCodec *AvcodecFindDecoder(enum CodecID id);
++ AVCodec *AvcodecFindEncoder(enum AVCodecID id);
++ AVCodec *AvcodecFindDecoder(enum AVCodecID id);
+ AVCodecContext *AvcodecAllocContext(AVCodec*);
+ AVFrame *AvcodecAllocFrame(void);
+ int AvcodecOpen(AVCodecContext *ctx, AVCodec *codec);
+@@ -117,7 +117,7 @@ class FFMPEGLibrary
+ DynaLink m_libAvcodec;
+ DynaLink m_libAvutil;
+
+- CodecID m_codec;
++ AVCodecID m_codec;
+ char m_codecString[32];
+
+ bool m_isLoadedOK;
diff -Nru opal-3.10.10~dfsg/debian/patches/series opal-3.10.10~dfsg/debian/patches/series
--- opal-3.10.10~dfsg/debian/patches/series 2013-09-13 07:21:02.000000000 -0400
+++ opal-3.10.10~dfsg/debian/patches/series 2014-05-03 15:14:22.000000000 -0400
@@ -1,3 +1,4 @@
disable-samples-ftbfs.diff
plugins_clean_target.patch
libav9.patch
+libav10.patch