[SCM] lives/master: Add dirty workaround for avpriv_set_pts_info
sramacher at users.alioth.debian.org
sramacher at users.alioth.debian.org
Fri Nov 29 21:07:55 UTC 2013
The following commit has been merged in the master branch:
commit b9680c6e96102ea2680dbdef66ceb127ec5bfb2e
Author: Sebastian Ramacher <sramacher at debian.org>
Date: Fri Nov 29 21:31:49 2013 +0100
Add dirty workaround for avpriv_set_pts_info
Signed-off-by: Sebastian Ramacher <sramacher at debian.org>
diff --git a/debian/patches/03-libav9.patch b/debian/patches/03-libav9.patch
index 6063433..0e8347f 100644
--- a/debian/patches/03-libav9.patch
+++ b/debian/patches/03-libav9.patch
@@ -1,4 +1,6 @@
-Description: Fix comilation with libav 9
+Description: Fix compilation with libav 9
+ This patch includes libav 9 related fixes up until revision
+ 1943. It also contains a temporary workaround for avpriv_set_pts_info.
Origin: upstream
Last-Update: 2013-11-29
@@ -12,7 +14,7 @@ Last-Update: 2013-11-29
#ifndef IS_MINGW
#ifndef IS_SOLARIS
#include <endian.h>
-@@ -57,11 +58,36 @@
+@@ -57,11 +58,42 @@
#endif
#include <libavformat/avformat.h>
@@ -43,13 +45,19 @@ Last-Update: 2013-11-29
+#define av_new_stream(a, b) avformat_new_stream(a, NULL)
+#endif
+
++#if !defined(HAVE_AVPRIV_SET_PTS_INFO) && LIBAVFORMAT_VERSION_MAJOR >= 54
++void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits,
++ unsigned int pts_num, unsigned int pts_den);
++#define HAVE_AVPRIV_SET_PTS_INFO 1
++#endif
++
+#if HAVE_AVPRIV_SET_PTS_INFO
+#define av_set_pts_info(a,b,c,d) avpriv_set_pts_info(a,b,c,d)
+#endif
static enum CodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag)
{
-@@ -2003,7 +2029,8 @@
+@@ -2003,7 +2035,8 @@
return FALSE;
}
@@ -59,7 +67,7 @@ Last-Update: 2013-11-29
fprintf(stderr, "asf_decoder: Could not open avcodec context (%d) %d\n",retval,vidst->codec->frame_number);
detach_stream(cdata);
return FALSE;
-@@ -2323,6 +2350,9 @@
+@@ -2323,6 +2356,9 @@
cdata->asigned=TRUE;
cdata->ainterleaf=TRUE;
@@ -69,7 +77,7 @@ Last-Update: 2013-11-29
return cdata;
}
-@@ -2378,18 +2408,23 @@
+@@ -2378,18 +2414,23 @@
boolean get_frame(const lives_clip_data_t *cdata, int64_t tframe, int *rowstrides, int height, void **pixel_data) {
// seek to frame,
@@ -98,7 +106,7 @@ Last-Update: 2013-11-29
register int i,p;
#ifdef DEBUG_KFRAMES
-@@ -2414,7 +2449,8 @@
+@@ -2414,7 +2455,8 @@
if (pal==WEED_PALETTE_RGB24||pal==WEED_PALETTE_BGR24) psize=3;
@@ -108,7 +116,7 @@ Last-Update: 2013-11-29
if (pal==WEED_PALETTE_YUV411) psize=6;
-@@ -2470,6 +2506,7 @@
+@@ -2470,6 +2512,7 @@
priv->ctx->skip_frame=AVDISCARD_NONREF;
priv->last_frame=tframe;
@@ -116,7 +124,7 @@ Last-Update: 2013-11-29
// do this until we reach target frame //////////////
-@@ -2520,7 +2557,7 @@
+@@ -2520,7 +2563,7 @@
}
@@ -125,7 +133,7 @@ Last-Update: 2013-11-29
if (priv->black_fill) btop=cdata->frame_height;
-@@ -2531,7 +2568,8 @@
+@@ -2531,7 +2574,8 @@
for (i=0;i<xheight;i++) {
if (i<btop||i>bbot) {
// top or bottom border, copy black row
@@ -135,7 +143,7 @@ Last-Update: 2013-11-29
memset(dst,black[p],dstwidth+(bleft+bright)*psize);
dst+=dstwidth+(bleft+bright)*psize;
}
-@@ -2540,7 +2578,8 @@
+@@ -2540,7 +2584,8 @@
}
if (bleft>0) {
@@ -145,7 +153,7 @@ Last-Update: 2013-11-29
memset(dst,black[p],bleft*psize);
dst+=bleft*psize;
}
-@@ -2551,7 +2590,8 @@
+@@ -2551,7 +2596,8 @@
dst+=dstwidth;
if (bright>0) {
@@ -281,7 +289,7 @@ Last-Update: 2013-11-29
#include <sys/stat.h>
const char *plugin_version="LiVES mkv decoder version 1.2";
-@@ -63,17 +64,60 @@
+@@ -63,17 +64,66 @@
#include <libavformat/avformat.h>
#include <libavutil/avstring.h>
@@ -333,6 +341,12 @@ Last-Update: 2013-11-29
+#define av_new_stream(a, b) avformat_new_stream(a, NULL)
+#endif
+
++#if !defined(HAVE_AVPRIV_SET_PTS_INFO) && LIBAVFORMAT_VERSION_MAJOR >= 54
++void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits,
++ unsigned int pts_num, unsigned int pts_den);
++#define HAVE_AVPRIV_SET_PTS_INFO 1
++#endif
++
+#if HAVE_AVPRIV_SET_PTS_INFO
+#define av_set_pts_info(a,b,c,d) avpriv_set_pts_info(a,b,c,d)
+#endif
@@ -344,7 +358,7 @@ Last-Update: 2013-11-29
#if CONFIG_ZLIB
#include <zlib.h>
#endif
-@@ -96,7 +140,6 @@
+@@ -96,7 +146,6 @@
};
@@ -352,7 +366,7 @@ Last-Update: 2013-11-29
static enum CodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag)
{
int i;
-@@ -1748,9 +1791,9 @@
+@@ -1748,9 +1797,9 @@
return FALSE;
}
@@ -364,7 +378,7 @@ Last-Update: 2013-11-29
fprintf(stderr, "mkv_decoder: Could not open avcodec context for codec\n");
detach_stream(cdata);
return FALSE;
-@@ -2076,6 +2119,9 @@
+@@ -2076,6 +2125,9 @@
cdata->asigned=TRUE;
cdata->ainterleaf=TRUE;
@@ -374,7 +388,7 @@ Last-Update: 2013-11-29
return cdata;
}
-@@ -2604,6 +2650,7 @@
+@@ -2604,6 +2656,7 @@
//priv->ctx->skip_frame=AVDISCARD_NONREF;
priv->last_frame=tframe;
@@ -382,7 +396,7 @@ Last-Update: 2013-11-29
// do this until we reach target frame //////////////
-@@ -2640,7 +2687,7 @@
+@@ -2640,7 +2693,7 @@
}
@@ -401,7 +415,7 @@ Last-Update: 2013-11-29
#include <sys/stat.h>
#ifndef IS_MINGW
-@@ -55,27 +56,63 @@
+@@ -55,27 +56,69 @@
#include "decplugin.h"
@@ -461,6 +475,12 @@ Last-Update: 2013-11-29
+#if HAVE_AVFORMAT_NEW_STREAM
+#define av_new_stream(a, b) avformat_new_stream(a, NULL)
+#endif
++
++#if !defined(HAVE_AVPRIV_SET_PTS_INFO) && LIBAVFORMAT_VERSION_MAJOR >= 54
++void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits,
++ unsigned int pts_num, unsigned int pts_den);
++#define HAVE_AVPRIV_SET_PTS_INFO 1
++#endif
+#if HAVE_AVPRIV_SET_PTS_INFO
+#define av_set_pts_info(a,b,c,d) avpriv_set_pts_info(a,b,c,d)
@@ -468,7 +488,7 @@ Last-Update: 2013-11-29
/**
* Read 1-25 bits.
-@@ -1009,6 +1046,7 @@
+@@ -1009,6 +1052,7 @@
memcpy(sub_pes, pes, sizeof(*sub_pes));
sub_st = av_new_stream(pes->stream, pes->pid);
@@ -476,7 +496,7 @@ Last-Update: 2013-11-29
if (!sub_st) {
av_free(sub_pes);
return AVERROR(ENOMEM);
-@@ -3064,9 +3102,9 @@
+@@ -3064,9 +3108,9 @@
return FALSE;
}
@@ -488,7 +508,7 @@ Last-Update: 2013-11-29
fprintf(stderr, "mpegts_decoder: Could not open avcodec context\n");
detach_stream(cdata);
return FALSE;
-@@ -3292,6 +3330,9 @@
+@@ -3292,6 +3336,9 @@
fprintf(stderr,"fps is %.4f %ld %ld %ld\n",cdata->fps,cdata->nframes,ldts,priv->start_dts);
#endif
@@ -498,7 +518,7 @@ Last-Update: 2013-11-29
return TRUE;
}
-@@ -3517,6 +3558,7 @@
+@@ -3517,6 +3564,7 @@
//priv->ctx->skip_frame=AVDISCARD_NONREF;
priv->last_frame=tframe;
@@ -506,7 +526,7 @@ Last-Update: 2013-11-29
// do this until we reach target frame //////////////
-@@ -3554,7 +3596,7 @@
+@@ -3554,7 +3602,7 @@
}
@@ -552,16 +572,20 @@ Last-Update: 2013-11-29
+endif
+
flv_libs = flv_decoder.la
- FLVDEC_LIBS = @LIBAVCODEC_LIBS@ @LIBAVFORMAT_LIBS@
- FLVDEC_CFLAGS = @LIBAVFORMAT_CFLAGS@ @LIBAVCODEC_CFLAGS@ -Wno-deprecated-declarations
+-FLVDEC_LIBS = @LIBAVCODEC_LIBS@ @LIBAVFORMAT_LIBS@
+-FLVDEC_CFLAGS = @LIBAVFORMAT_CFLAGS@ @LIBAVCODEC_CFLAGS@ -Wno-deprecated-declarations
++FLVDEC_LIBS = @LIBAVCODEC_LIBS@ @LIBAVFORMAT_LIBS@ @LIBAVUTIL_LIBS@
++FLVDEC_CFLAGS = @LIBAVFORMAT_CFLAGS@ @LIBAVCODEC_CFLAGS@ @LIBAVUTIL_CFLAGS@ -Wno-deprecated-declarations
flv_decoder_la_SOURCES = flv_decoder.c flv_decoder.h
-flv_decoder_la_CFLAGS = $(shared_cflags) $(weed_cflags) $(FLVDEC_CFLAGS)
+flv_decoder_la_CFLAGS = $(libav_cflags) $(shared_cflags) $(weed_cflags) $(FLVDEC_CFLAGS)
flv_decoder_la_LDFLAGS = $(shared_ldflags) $(FLVDEC_LIBS)
asf_libs = asf_decoder.la
- ASFDEC_LIBS = @LIBAVCODEC_LIBS@ @LIBAVFORMAT_LIBS@
- ASFDEC_CFLAGS = @LIBAVFORMAT_CFLAGS@ @LIBAVCODEC_CFLAGS@ -Wno-deprecated-declarations
+-ASFDEC_LIBS = @LIBAVCODEC_LIBS@ @LIBAVFORMAT_LIBS@
+-ASFDEC_CFLAGS = @LIBAVFORMAT_CFLAGS@ @LIBAVCODEC_CFLAGS@ -Wno-deprecated-declarations
++ASFDEC_LIBS = @LIBAVCODEC_LIBS@ @LIBAVFORMAT_LIBS@ @LIBAVUTIL_LIBS@
++ASFDEC_CFLAGS = @LIBAVFORMAT_CFLAGS@ @LIBAVCODEC_CFLAGS@ @LIBAVUTIL_CFLAGS@ -Wno-deprecated-declarations
asf_decoder_la_SOURCES = asf_decoder.c asf_decoder.h
-asf_decoder_la_CFLAGS = $(shared_cflags) $(weed_cflags) $(ASFDEC_CFLAGS)
+asf_decoder_la_CFLAGS = $(libav_cflags) $(shared_cflags) $(weed_cflags) $(ASFDEC_CFLAGS)
--
lives packaging
More information about the pkg-multimedia-commits
mailing list