[SCM] MLT multimedia framework packaging branch, master, updated. debian/0.9.2-1-4-g876bce2
Patrick Matthäi
pmatthaei at moszumanska.debian.org
Wed Sep 24 17:19:25 UTC 2014
Gitweb-URL: http://git.debian.org/?p=pkg-kde/krap/mlt.git;a=commitdiff;h=c239807
The following commit has been merged in the master branch:
commit c2398071db88e6965fde08fb7f82d20c192d7147
Author: Patrick Matthäi <pmatthaei at debian.org>
Date: Wed Sep 24 19:01:18 2014 +0200
* Add upstream patch 02-audio-rendering-libav0.11 to fix audio rendering with
libav 0.11.
Closes: #761593
---
debian/changelog | 8 ++
debian/patches/02-audio-rendering-libav0.11.diff | 110 +++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 119 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 82a5ebb..8f0f6d8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+mlt (0.9.2-2) UNRELEASED; urgency=medium
+
+ * Add upstream patch 02-audio-rendering-libav0.11 to fix audio rendering with
+ libav 0.11.
+ Closes: #761593
+
+ -- Patrick Matthäi <pmatthaei at debian.org> Wed, 24 Sep 2014 19:00:33 +0200
+
mlt (0.9.2-1) unstable; urgency=medium
* New upstream release.
diff --git a/debian/patches/02-audio-rendering-libav0.11.diff b/debian/patches/02-audio-rendering-libav0.11.diff
new file mode 100644
index 0000000..ea64766
--- /dev/null
+++ b/debian/patches/02-audio-rendering-libav0.11.diff
@@ -0,0 +1,110 @@
+# Upstream patch to fix audio encoding with current libav versions.
+# URL: https://github.com/mltframework/mlt/commit/3ac0201b2526e2d11280005f67a63979fb5c783c
+# Closes: #761593
+
+diff -Naur mlt-0.9.2.orig/src/modules/avformat/consumer_avformat.c mlt-0.9.2/src/modules/avformat/consumer_avformat.c
+--- mlt-0.9.2.orig/src/modules/avformat/consumer_avformat.c 2014-09-24 18:44:52.000000000 +0200
++++ mlt-0.9.2/src/modules/avformat/consumer_avformat.c 2014-09-24 18:50:32.474014332 +0200
+@@ -1232,12 +1232,15 @@
+ char key[27];
+ mlt_properties frame_meta_properties = mlt_properties_new();
+ int error_count = 0;
+- int64_t synth_audio_pts = 0;
++ int64_t sample_count[ MAX_AUDIO_STREAMS ];
+
+ // Initialize audio_st
+ int i = MAX_AUDIO_STREAMS;
+ while ( i-- )
++ {
+ audio_st[i] = NULL;
++ sample_count[i] = 0;
++ }
+
+ // Check for user selected format first
+ if ( format != NULL )
+@@ -1657,9 +1660,8 @@
+ #if LIBAVCODEC_VERSION_MAJOR >= 54
+ audio_avframe->nb_samples = FFMAX( samples, audio_input_nb_samples );
+ #if LIBAVCODEC_VERSION_MAJOR >= 55
+- if ( audio_codec_id == AV_CODEC_ID_VORBIS )
+- audio_avframe->pts = synth_audio_pts;
+- synth_audio_pts += audio_avframe->nb_samples;
++ audio_avframe->pts = sample_count[i];
++ sample_count[i] += audio_avframe->nb_samples;
+ #endif
+ avcodec_fill_audio_frame( audio_avframe, codec->channels, codec->sample_fmt,
+ (const uint8_t*) p, AUDIO_ENCODE_BUFFER_SIZE, 0 );
+@@ -1749,9 +1751,8 @@
+ #if LIBAVCODEC_VERSION_MAJOR >= 54
+ audio_avframe->nb_samples = FFMAX( samples, audio_input_nb_samples );
+ #if LIBAVCODEC_VERSION_MAJOR >= 55
+- if ( audio_codec_id == AV_CODEC_ID_VORBIS )
+- audio_avframe->pts = synth_audio_pts;
+- synth_audio_pts += audio_avframe->nb_samples;
++ audio_avframe->pts = sample_count[i];
++ sample_count[i] += audio_avframe->nb_samples;
+ #endif
+ avcodec_fill_audio_frame( audio_avframe, codec->channels, codec->sample_fmt,
+ (const uint8_t*) audio_buf_2, AUDIO_ENCODE_BUFFER_SIZE, 0 );
+@@ -1788,8 +1789,8 @@
+ goto on_fatal_error;
+ }
+ error_count = 0;
+- mlt_log_debug( MLT_CONSUMER_SERVICE( consumer ), "audio stream %d pkt pts %"PRId64" frame_size %d stream pts %"PRId64"
",
+- stream->index, pkt.pts, codec->frame_size, stream->pts.val );
++ mlt_log_debug( MLT_CONSUMER_SERVICE( consumer ), "audio stream %d pkt pts %"PRId64" frame_size %d
",
++ stream->index, pkt.pts, codec->frame_size );
+ }
+ else if ( pkt.size < 0 )
+ {
+@@ -1800,7 +1801,7 @@
+
+ if ( i == 0 )
+ {
+- audio_pts = (double)stream->pts.val * av_q2d( stream->time_base );
++ audio_pts = (double) sample_count[0] * av_q2d( stream->time_base );
+ }
+ }
+ }
+@@ -1974,7 +1975,6 @@
+ // write the compressed frame in the media file
+ ret = av_interleaved_write_frame(oc, &pkt);
+ mlt_log_debug( MLT_CONSUMER_SERVICE( consumer ), " frame_size %d
", c->frame_size );
+- video_pts = (double)video_st->pts.val * av_q2d( video_st->time_base );
+
+ // Dual pass logging
+ if ( mlt_properties_get_data( properties, "_logfile", NULL ) && c->stats_out )
+@@ -1990,7 +1990,8 @@
+ ret = 0;
+ }
+ }
+- frame_count++;
++ frame_count++;
++ video_pts = (double) frame_count * av_q2d( video_st->time_base );
+ if ( ret )
+ {
+ mlt_log_fatal( MLT_CONSUMER_SERVICE( consumer ), "error writing video frame
" );
+@@ -2006,9 +2007,9 @@
+ }
+ }
+ if ( audio_st[0] )
+- mlt_log_debug( MLT_CONSUMER_SERVICE( consumer ), "audio pts %"PRId64" (%f) ", audio_st[0]->pts.val, audio_pts );
++ mlt_log_debug( MLT_CONSUMER_SERVICE( consumer ), "audio pts %f ", audio_pts );
+ if ( video_st )
+- mlt_log_debug( MLT_CONSUMER_SERVICE( consumer ), "video pts %"PRId64" (%f) ", video_st->pts.val, video_pts );
++ mlt_log_debug( MLT_CONSUMER_SERVICE( consumer ), "video pts %f ", video_pts );
+ mlt_log_debug( MLT_CONSUMER_SERVICE( consumer ), "
" );
+ }
+
+@@ -2062,9 +2063,8 @@
+ pkt.size = audio_outbuf_size;
+ audio_avframe->nb_samples = FFMAX( samples / channels, audio_input_nb_samples );
+ #if LIBAVCODEC_VERSION_MAJOR >= 55
+- if ( audio_codec_id == AV_CODEC_ID_VORBIS )
+- audio_avframe->pts = synth_audio_pts;
+- synth_audio_pts += audio_avframe->nb_samples;
++ audio_avframe->pts = sample_count[0];
++ sample_count[0] += audio_avframe->nb_samples;
+ #endif
+ avcodec_fill_audio_frame( audio_avframe, c->channels, c->sample_fmt,
+ (const uint8_t*) p, AUDIO_ENCODE_BUFFER_SIZE, 0 );
diff --git a/debian/patches/series b/debian/patches/series
index abc7af8..4d3ec5c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
01-changed-preset-path.diff
+02-audio-rendering-libav0.11.diff
--
MLT multimedia framework packaging
More information about the pkg-kde-commits
mailing list