[SCM] dvdstyler/master: Drop fix-libav0.8.patch, now unnecessary.

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Wed Oct 10 00:34:04 UTC 2012


The following commit has been merged in the master branch:
commit 7134d6c6d6be452cb2af4bcf96023d8986a051a2
Author: Alessio Treglia <alessio at debian.org>
Date:   Wed Oct 10 01:32:06 2012 +0100

    Drop fix-libav0.8.patch, now unnecessary.

diff --git a/debian/patches/fix-libav0.8.patch b/debian/patches/fix-libav0.8.patch
deleted file mode 100644
index 396536d..0000000
--- a/debian/patches/fix-libav0.8.patch
+++ /dev/null
@@ -1,220 +0,0 @@
-Description: adjust dvdstyler for libav 0.8
-Author: Fabrice Coutadeur <fabricesp at ubuntu.com>
-
---- a/src/mediaenc_ffmpeg.cpp
-+++ b/src/mediaenc_ffmpeg.cpp
-@@ -26,6 +26,7 @@ extern "C" {
- #define __STDC_LIMIT_MACROS
- #include <libavformat/avformat.h>
- #include <libswscale/swscale.h>
-+#include <libavutil/mathematics.h>
- }
- 
- #define AUDIO_BUF_SIZE 524288
-@@ -166,12 +167,18 @@ bool wxFfmpegMediaEncoder::addAudioStrea
- 
- 	AVCodecContext* c = m_audioStm->codec;
- 	c->thread_count = m_threadCount;
-+	c->time_base.den = 25;
-+	c->time_base.num = 1;
- 	c->codec_id = (CodecID) codecId;
- 	c->codec_type = AVMEDIA_TYPE_AUDIO;
- 	c->bit_rate = 64000;
- 	c->sample_rate = 48000;
- 	c->sample_fmt = codecId == CODEC_ID_AC3 ? AV_SAMPLE_FMT_FLT : AV_SAMPLE_FMT_S16;
- 	c->channels = 2;
-+	// some formats want stream headers to be separate
-+	if(m_outputCtx->oformat->flags & AVFMT_GLOBALHEADER)
-+	    c->flags |= CODEC_FLAG_GLOBAL_HEADER;
-+
- 	return true;
- }
- 
---- a/src/mediatrc_ffmpeg.cpp
-+++ b/src/mediatrc_ffmpeg.cpp
-@@ -22,11 +22,12 @@ extern "C" {
- #include <libavutil/fifo.h>
- #include <libavutil/dict.h>
- #include <libavutil/pixdesc.h>
-+#include <libavutil/mathematics.h>
- #include <libswscale/swscale.h>
--#include <libavfilter/avcodec.h>
-+#include <libavcodec/avcodec.h>
- #include <libavfilter/avfilter.h>
- #include <libavfilter/avfiltergraph.h>
--#include <libavfilter/vsink_buffer.h>
-+#include <libavfilter/vsrc_buffer.h>
- }
- 
- #define AUDIO_BUF_SIZE 50000
-@@ -46,6 +47,68 @@ extern "C" {
- #if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53, 4, 0)
- #define AVIO_FLAG_WRITE AVIO_WRONLY
- #endif
-+#define CODEC_CAP_LOSSLESS         0x80000000
-+
-+static int avsink_init(AVFilterContext *ctx, const char *args, void *opaque)
-+{
-+    AVSinkContext *priv =(AVSinkContext *)ctx->priv;
-+
-+    if (!opaque)
-+        return AVERROR(EINVAL);
-+    *priv = *(AVSinkContext *)opaque;
-+
-+    return 0;
-+}
-+
-+static void null_end_frame(AVFilterLink *inlink) { }
-+
-+static int avsink_query_formats(AVFilterContext *ctx)
-+{
-+    AVSinkContext *priv = (AVSinkContext *)ctx->priv;
-+    enum PixelFormat pix_fmts[] = { priv->pix_fmt, PIX_FMT_NONE };
-+
-+    avfilter_set_common_formats(ctx, avfilter_make_format_list((const int*)pix_fmts));
-+    return 0;
-+}
-+
-+AVFilter avsink = {
-+    "avsink",
-+    sizeof(AVSinkContext),
-+    avsink_init,
-+    NULL,
-+    avsink_query_formats,
-+    (AVFilterPad[]) {{ "default",
-+                       AVMEDIA_TYPE_VIDEO,
-+                       AV_PERM_READ,
-+                       0,
-+                       NULL,
-+                       NULL,
-+                       NULL,
-+                       null_end_frame,
-+                       },
-+                       { NULL }},
-+    (AVFilterPad[]) {{ NULL }},
-+};
-+
-+int get_filtered_video_frame(AVFilterContext *ctx, AVFrame *frame, AVFilterBufferRef **picref_ptr, AVRational *tb) {
-+	int ret;
-+	AVFilterBufferRef *picref;
-+
-+	if ((ret = avfilter_request_frame(ctx->inputs[0])) < 0)
-+		return ret;
-+	if (!(picref = ctx->inputs[0]->cur_buf))
-+		return AVERROR(ENOENT);
-+	*picref_ptr = picref;
-+	ctx->inputs[0]->cur_buf = NULL;
-+	*tb = ctx->inputs[0]->time_base;
-+
-+	memcpy(frame->data, picref->data, sizeof(frame->data));
-+	memcpy(frame->linesize, picref->linesize, sizeof(frame->linesize));
-+	frame->interlaced_frame = picref->video->interlaced;
-+	frame->top_field_first = picref->video->top_field_first;
-+
-+	return 1;
-+}
- 
- //////////////////////////// AVAudioConvert /////////////////////////////////
- // audioconvert.h
-@@ -174,7 +237,7 @@ static int configure_video_filters(Input
-                                        "src", args, NULL, ost->graph);
-     if (ret < 0)
-         return ret;
--    ret = avfilter_graph_create_filter(&ost->output_video_filter, avfilter_get_by_name("buffersink"),
-+    ret = avfilter_graph_create_filter(&ost->output_video_filter, &avsink,
-                                        "out", NULL, pix_fmts, ost->graph);
-     if (ret < 0)
-         return ret;
-@@ -197,8 +260,8 @@ static int configure_video_filters(Input
-     ost->graph->scale_sws_opts = av_strdup(args);
- 
-     if (ost->avfilter) {
--        AVFilterInOut *outputs = avfilter_inout_alloc();
--        AVFilterInOut *inputs  = avfilter_inout_alloc();
-+        AVFilterInOut *outputs = (AVFilterInOut*) av_malloc(sizeof(AVFilterInOut));
-+        AVFilterInOut *inputs  = (AVFilterInOut*) av_malloc(sizeof(AVFilterInOut));
- 
-         outputs->name    = av_strdup("in");
-         outputs->filter_ctx = last_filter;
-@@ -210,7 +273,7 @@ static int configure_video_filters(Input
-         inputs->pad_idx = 0;
-         inputs->next    = NULL;
- 
--        if ((ret = avfilter_graph_parse(ost->graph, ost->avfilter, &inputs, &outputs, NULL)) < 0)
-+        if ((ret = avfilter_graph_parse(ost->graph, ost->avfilter, inputs, outputs, NULL)) < 0)
-             return ret;
-         av_freep(&ost->avfilter);
-     } else {
-@@ -1085,7 +1148,7 @@ bool wxFfmpegMediaTranscoder::AddAudioSt
- 	AVStream *st;
- 	OutputStream *ost;
- 	AVCodecContext *audio_enc;
--	
-+
- 	ost = NewOutputStream(oc, AVMEDIA_TYPE_AUDIO, (int) audioFormat);
- 	st = ost->st;
- 	
-@@ -1105,7 +1168,7 @@ bool wxFfmpegMediaTranscoder::AddAudioSt
- 		audio_enc->flags |= CODEC_FLAG_GLOBAL_HEADER;
- 	}
- 	if (audioFormat != afCOPY) {
--		av_set_int(audio_enc, "b:a", bitrate*1000);
-+		audio_enc->bit_rate= bitrate*1000;
- 		
- 		if (audio_qscale > QSCALE_NONE) {
- 			audio_enc->flags |= CODEC_FLAG_QSCALE;
-@@ -2071,11 +2134,13 @@ bool wxFfmpegMediaTranscoder::OutputPack
- 			for(i=0;i<nb_output_streams;i++) {
- 				ost = &ost_table[i];
- 				if (ost->input_video_filter && ost->source_index == ist_index) {
--					if (!picture.sample_aspect_ratio.num)
-+					if (ist->st->sample_aspect_ratio.num)
- 						picture.sample_aspect_ratio = ist->st->sample_aspect_ratio;
--					picture.pts = ist->pts;
-+					//picture.pts = ist->pts;
- 
--					av_vsrc_buffer_add_frame(ost->input_video_filter, &picture, AV_VSRC_BUF_FLAG_OVERWRITE);
-+					av_vsrc_buffer_add_frame(ost->input_video_filter, &picture,
-+						ist->pts,
-+	                                        picture.sample_aspect_ratio);
- 				}
- 			}
- 		}
-@@ -2123,12 +2188,11 @@ bool wxFfmpegMediaTranscoder::OutputPack
- 				frame_available = ist->st->codec->codec_type != AVMEDIA_TYPE_VIDEO ||
- 					!ost->output_video_filter || avfilter_poll_frame(ost->output_video_filter->inputs[0]);
- 				while (frame_available) {
-+					AVRational ist_pts_tb;
-+
- 					if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && ost->output_video_filter) {
--						AVRational ist_pts_tb = ost->output_video_filter->inputs[0]->time_base;
--						if (av_vsink_buffer_get_video_buffer_ref(ost->output_video_filter, &ost->picref, 0) < 0)
--							goto cont;
-+						get_filtered_video_frame(ost->output_video_filter, &picture, &ost->picref, &ist_pts_tb);
- 						if (ost->picref) {
--							avfilter_fill_frame_from_video_buffer_ref(&picture, ost->picref);
- 							ist->pts = av_rescale_q(ost->picref->pts, ist_pts_tb, AV_TIME_BASE_Q);
- 						}
- 					}
-@@ -2147,7 +2211,7 @@ bool wxFfmpegMediaTranscoder::OutputPack
- 							break;
- 						case AVMEDIA_TYPE_VIDEO:
-                             if (ost->picref->video)
--                                ost->st->codec->sample_aspect_ratio = ost->picref->video->sample_aspect_ratio;
-+                                ost->st->codec->sample_aspect_ratio = ost->picref->video->pixel_aspect;
- 							if (!DoVideoOut(os, ost, ist, &picture, &frame_size, bit_buffer_size, bit_buffer))
- 								return false;
- //							if (vstats_filename && frame_size)
---- a/src/mediatrc_ffmpeg.h
-+++ b/src/mediatrc_ffmpeg.h
-@@ -23,6 +23,10 @@ extern "C" {
- #define __STDC_LIMIT_MACROS
- #include <libavformat/avformat.h>
- #include <libswscale/swscale.h>
-+
-+typedef struct {
-+    enum PixelFormat pix_fmt;
-+} AVSinkContext;
- }
- 
- // select an input stream for an output stream
diff --git a/debian/patches/series b/debian/patches/series
index d62e3e1..dd3a29d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
 fix_desktop_file.patch #Fix errors detected by desktop-file-validate
 genisoimage.patch
-fix-libav0.8.patch
 drop-mplex.patch

-- 
dvdstyler packaging



More information about the pkg-multimedia-commits mailing list