~ubuntu-branches/ubuntu/raring/libav/raring-security

« back to all changes in this revision

Viewing changes to debian/patches/post-0.7.1/0008-dca-set-AVCodecContext-frame_size-for-DTS-audio.patch

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2011-09-28 09:18:34 UTC
  • mfrom: (1.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20110928091834-w415mnuh06h4zpvc
Tags: 4:0.7.1-7ubuntu2
Revert "Convert package to include multiarch support."

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 06318968853ff8c628bbc75fb126483c08f22fd9 Mon Sep 17 00:00:00 2001
 
2
From: John Stebbins <stebbins@jetheaddev.com>
 
3
Date: Mon, 4 Jul 2011 09:55:19 -0700
 
4
Subject: [PATCH 08/70] dca: set AVCodecContext frame_size for DTS audio
 
5
 
 
6
Set the frame size when decoding DTS audio.
 
7
 
 
8
This has the side effect of fixing the computation of timestamps for DTS-HD in compute_pkt_fields.  Since frame_size is
 
9
not currently set, the duration of a frame is being guessed based on the streams bitrate.  But for DTS-HD, the bitrate
 
10
currently used is the rate of the DTS core which is much different than the whole DTS-HD stream and leads to a wildly
 
11
inaccurate frame duration estimate.
 
12
 
 
13
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
 
14
(cherry picked from commit 49c7006c7e815d4330247624a9e6ba30e288cd02)
 
15
 
 
16
Signed-off-by: Anton Khirnov <anton@khirnov.net>
 
17
---
 
18
 libavcodec/dca.c |    1 +
 
19
 1 files changed, 1 insertions(+), 0 deletions(-)
 
20
 
 
21
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
 
22
index a9b2c9b..fad6bce 100644
 
23
--- a/libavcodec/dca.c
 
24
+++ b/libavcodec/dca.c
 
25
@@ -1650,6 +1650,7 @@ static int dca_decode_frame(AVCodecContext * avctx,
 
26
     //set AVCodec values with parsed data
 
27
     avctx->sample_rate = s->sample_rate;
 
28
     avctx->bit_rate = s->bit_rate;
 
29
+    avctx->frame_size = s->sample_blocks * 32;
 
30
 
 
31
     s->profile = FF_PROFILE_DTS;
 
32
 
 
33
-- 
 
34
1.7.4.1
 
35