[SCM] gmerlin-encoders/master: Simplified patch
zmoelnig-guest at users.alioth.debian.org
zmoelnig-guest at users.alioth.debian.org
Mon Jun 11 15:39:48 UTC 2012
The following commit has been merged in the master branch:
commit fc108f3977f17b5b0bf304fa84ef2e783e238f8f
Author: IOhannes m zmölnig <zmoelnig at iem.at>
Date: Mon Jun 11 17:37:42 2012 +0200
Simplified patch
diff --git a/debian/patches/libav.patch b/debian/patches/libav.patch
index 417e96e..aca3789 100644
--- a/debian/patches/libav.patch
+++ b/debian/patches/libav.patch
@@ -1,151 +1,8 @@
Author: IOhannes m zmölnig
-Description: more fine-grained version-checks for ffmpeg-features.
-
---- gmerlin-encoders.orig/plugins/ffmpeg/codecs.c
-+++ gmerlin-encoders/plugins/ffmpeg/codecs.c
-@@ -870,7 +870,8 @@
- found = 1; \
- }
-
--#if LIBAVCODEC_VERSION_MAJOR >= 54
-+#ifdef USE_AV_DICTIONARY
-+
- #define PARAM_DICT_STRING(n, ffmpeg_key) \
- if(!strcmp(n, name)) \
- { \
-@@ -901,7 +902,7 @@
-
- void
- bg_ffmpeg_set_codec_parameter(AVCodecContext * ctx,
--#if LIBAVCODEC_VERSION_MAJOR >= 54
-+#ifdef USE_AV_DICTIONARY
- AVDictionary ** options,
- #endif
-
-@@ -1009,7 +1010,7 @@
- PARAM_FLAG2("ff_flag2_fast",CODEC_FLAG2_FAST);
- PARAM_FLAG2("ff_flag2_strict_gop",CODEC_FLAG2_STRICT_GOP);
-
--#if LIBAVCODEC_VERSION_MAJOR >= 54
-+#ifdef USE_AV_DICTIONARY
- PARAM_DICT_STRING("libx264_preset", "preset");
- PARAM_DICT_STRING("libx264_tune", "tune");
- PARAM_DICT_FLOAT("libx264_crf", "crf");
---- gmerlin-encoders.orig/plugins/ffmpeg/ffmpeg_common.c
-+++ gmerlin-encoders/plugins/ffmpeg/ffmpeg_common.c
-@@ -537,7 +537,7 @@
- }
- else
- bg_ffmpeg_set_codec_parameter(st->stream->codec,
--#if LIBAVCODEC_VERSION_MAJOR >= 54
-+#ifdef USE_AV_DICTIONARY
- &st->options,
- #endif
- name, v);
-@@ -585,7 +585,7 @@
- }
- else
- bg_ffmpeg_set_codec_parameter(st->stream->codec,
--#if LIBAVCODEC_VERSION_MAJOR >= 54
-+#ifdef USE_AV_DICTIONARY
- &st->options,
- #endif
- name, v);
-@@ -635,7 +635,7 @@
- if(priv->ctx->oformat->flags & AVFMT_GLOBALHEADER)
- st->stream->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
-
--#if LIBAVCODEC_VERSION_MAJOR < 54
-+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(53,7,1)
- if(avcodec_open(st->stream->codec, codec) < 0)
- {
- bg_log(BG_LOG_ERROR, LOG_DOMAIN, "avcodec_open failed for audio");
-@@ -760,7 +760,7 @@
- if(priv->ctx->oformat->flags & AVFMT_GLOBALHEADER)
- st->stream->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
-
--#if LIBAVCODEC_VERSION_MAJOR < 54
-+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(53,7,1)
- if(avcodec_open(st->stream->codec, codec) < 0)
- {
- bg_log(BG_LOG_ERROR, LOG_DOMAIN, "avcodec_open failed for video");
-@@ -789,7 +789,7 @@
- int i;
- priv = data;
-
--#if LIBAVFORMAT_VERSION_MAJOR < 54
-+#if LIBAVFORMAT_VERSION_MAJOR < 52
- /* set the output parameters (must be done even if no
- parameters). */
- if(av_set_parameters(priv->ctx, NULL) < 0)
-@@ -820,7 +820,7 @@
- return 0;
- #endif
-
--#if LIBAVFORMAT_VERSION_MAJOR < 54
-+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53,2,0)
- if(av_write_header(priv->ctx))
- {
- bg_log(BG_LOG_ERROR, LOG_DOMAIN, "av_write_header failed");
-@@ -1042,7 +1042,7 @@
- st->buffer, st->buffer_alloc,
- frame);
- if(bytes_encoded < 0)
-- return;
-+ return -1;
- else if(bytes_encoded > 0)
- got_packet = 1;
- #endif
-@@ -1134,7 +1134,7 @@
-
- av_init_packet(&pkt);
-
-- fprintf(stderr, "Write subtitle 1 %ld -> %ld\n", start, start + duration);
-+ fprintf(stderr, "Write subtitle 1 %ld -> %ld\n", (long int)start, (long int)(start + duration));
- fprintf(stderr, "%s\n", text);
-
- pkt.data = (uint8_t*)bg_strdup(NULL, text);
-@@ -1147,8 +1147,8 @@
- st->stream->codec->time_base,
- st->stream->time_base) + st->pts_offset;
-
-- fprintf(stderr, "Write subtitle 2 %ld -> %ld\n", pkt.pts,
-- pkt.pts + pkt.duration);
-+ fprintf(stderr, "Write subtitle 2 %ld -> %ld\n", (long int)pkt.pts,
-+ (long int)(pkt.pts + pkt.duration));
-
- pkt.convergence_duration = pkt.duration;
- pkt.dts = pkt.pts;
+Description: 'samples_written' is needed when encoding AUDIO2 rather than VIDEO2
--- gmerlin-encoders.orig/plugins/ffmpeg/ffmpeg_common.h
+++ gmerlin-encoders/plugins/ffmpeg/ffmpeg_common.h
-@@ -52,6 +52,12 @@
- #define ENCODE_AUDIO 1
- #endif
-
-+#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(43<<8)+0)
-+#if LIBAVUTIL_VERSION_INT >= ((51<<16)+(8<<8)+0)
-+# define USE_AV_DICTIONARY
-+#endif
-+#endif
-+
-
- typedef struct
- {
-@@ -95,7 +101,7 @@
-
- void
- bg_ffmpeg_set_codec_parameter(AVCodecContext * ctx,
--#if LIBAVCODEC_VERSION_MAJOR >= 54
-+#ifdef USE_AV_DICTIONARY
- AVDictionary ** options,
- #endif
- const char * name,
-@@ -119,11 +125,11 @@
-
- int initialized;
-
--#if LIBAVCODEC_VERSION_MAJOR >= 54
-+#ifdef USE_AV_DICTIONARY
+@@ -123,7 +123,7 @@
AVDictionary * options;
#endif
@@ -154,12 +11,3 @@ Description: more fine-grained version-checks for ffmpeg-features.
int64_t samples_written;
#endif
-@@ -151,7 +157,7 @@
-
- int64_t frames_written;
-
--#if LIBAVCODEC_VERSION_MAJOR >= 54
-+#ifdef USE_AV_DICTIONARY
- AVDictionary * options;
- #endif
- const gavl_compression_info_t * ci;
--
gmerlin-encoders packaging
More information about the pkg-multimedia-commits
mailing list