[SCM] libav/master: add patch from upstream to fix playback of Canon AVHCD movies

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Mon Jun 25 17:13:24 UTC 2012


The following commit has been merged in the master branch:
commit cd2b75a3b94e91e18d4527a2e3e32d5acb1d0469
Author: Reinhard Tartler <siretart at tauware.de>
Date:   Mon Jun 25 19:06:33 2012 +0200

    add patch from upstream to fix playback of Canon AVHCD movies

diff --git a/debian/patches/post-0.8.1/0001-h264-allow-cropping-to-AVCodecContext.width-height.patch b/debian/patches/post-0.8.1/0001-h264-allow-cropping-to-AVCodecContext.width-height.patch
new file mode 100644
index 0000000..f7888ae
--- /dev/null
+++ b/debian/patches/post-0.8.1/0001-h264-allow-cropping-to-AVCodecContext.width-height.patch
@@ -0,0 +1,40 @@
+From e1608014c50eeb9f4744a53de0794eb6bb1269a2 Mon Sep 17 00:00:00 2001
+From: Mans Rullgard <mans at mansr.com>
+Date: Wed, 30 May 2012 04:04:54 +0100
+Subject: [PATCH 1/2] h264: allow cropping to AVCodecContext.width/height
+
+Override the frame size from the SPS with AVCodecContext values
+if the latter specify a size smaller by less than one macroblock.
+This is required for correct cropping of MOV files from Canon cameras.
+
+Signed-off-by: Mans Rullgard <mans at mansr.com>
+(cherry picked from commit 30f515091c323da59c0f1b533703dedca2f4b95d)
+
+Conflicts:
+
+	libavcodec/h264.c
+Signed-off-by: Reinhard Tartler <siretart at tauware.de>
+---
+ libavcodec/h264.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/libavcodec/h264.c b/libavcodec/h264.c
+index b229510..79298d7 100644
+--- a/libavcodec/h264.c
++++ b/libavcodec/h264.c
+@@ -2720,6 +2720,12 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
+     else
+         s->height= 16*s->mb_height - (2<<s->chroma_y_shift)*FFMIN(h->sps.crop_bottom, (16>>s->chroma_y_shift)-1);
+ 
++    if (FFALIGN(s->avctx->width,  16) == s->width &&
++        FFALIGN(s->avctx->height, 16) == s->height) {
++        s->width  = s->avctx->width;
++        s->height = s->avctx->height;
++    }
++
+     if (s->context_initialized
+         && (   s->width != s->avctx->width || s->height != s->avctx->height
+             || av_cmp_q(h->sps.sar, s->avctx->sample_aspect_ratio))) {
+-- 
+1.7.9.5
+
diff --git a/debian/patches/post-0.8.1/0002-mov-set-AVCodecContext.width-height-for-h264.patch b/debian/patches/post-0.8.1/0002-mov-set-AVCodecContext.width-height-for-h264.patch
new file mode 100644
index 0000000..af0ac93
--- /dev/null
+++ b/debian/patches/post-0.8.1/0002-mov-set-AVCodecContext.width-height-for-h264.patch
@@ -0,0 +1,33 @@
+From 2fb4be9a99a2c2a9435339830e3d940171cc0d9b Mon Sep 17 00:00:00 2001
+From: Mans Rullgard <mans at mansr.com>
+Date: Wed, 30 May 2012 04:06:00 +0100
+Subject: [PATCH 2/2] mov: set AVCodecContext.width/height for h264
+
+This is required for correct cropping of files from Canon
+cameras.
+
+Signed-off-by: Mans Rullgard <mans at mansr.com>
+(cherry picked from commit 8aa93e900449c88c3169ff5636fed03f41779cac)
+
+Signed-off-by: Reinhard Tartler <siretart at tauware.de>
+---
+ libavformat/mov.c |    3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/libavformat/mov.c b/libavformat/mov.c
+index f6be6a8..1dbf63f 100644
+--- a/libavformat/mov.c
++++ b/libavformat/mov.c
+@@ -1995,9 +1995,6 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
+ #if CONFIG_H263_DECODER
+     case CODEC_ID_H263:
+ #endif
+-#if CONFIG_H264_DECODER
+-    case CODEC_ID_H264:
+-#endif
+ #if CONFIG_MPEG4_DECODER
+     case CODEC_ID_MPEG4:
+ #endif
+-- 
+1.7.9.5
+
diff --git a/debian/patches/series b/debian/patches/series
index 66758ef..08bdd93 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,7 @@
 01-Tweak-doxygen-config.patch
 03-disable-configuration-warnings.patch
 04-ffmpeg-warning-change.patch
+
+# post 0.8.1 release patches
+post-0.8.1/0001-h264-allow-cropping-to-AVCodecContext.width-height.patch
+post-0.8.1/0002-mov-set-AVCodecContext.width-height-for-h264.patch

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list