~noskcaj/ubuntu/saucy/libav/merge0.8.7-1

« back to all changes in this revision

Viewing changes to debian/patches/post-0.7.1/0033-aac-Only-output-configure-if-audio-was-found.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 b4099a6dc539c54156a788c7020356c54bc6485e Mon Sep 17 00:00:00 2001
 
2
From: Alex Converse <alex.converse@gmail.com>
 
3
Date: Tue, 16 Aug 2011 11:03:26 -0700
 
4
Subject: [PATCH 33/70] aac: Only output configure if audio was found.
 
5
 
 
6
Audio found is not triggered on a CCE because a CCE alone has no output.
 
7
 
 
8
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
 
9
(cherry picked from commit d8425ed4af6d8fce62ff363cc590f85e57bac06b)
 
10
 
 
11
Signed-off-by: Anton Khirnov <anton@khirnov.net>
 
12
---
 
13
 libavcodec/aacdec.c |    7 +++++--
 
14
 1 files changed, 5 insertions(+), 2 deletions(-)
 
15
 
 
16
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
 
17
index f94b109..2958ddb 100644
 
18
--- a/libavcodec/aacdec.c
 
19
+++ b/libavcodec/aacdec.c
 
20
@@ -2074,7 +2074,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
 
21
     ChannelElement *che = NULL, *che_prev = NULL;
 
22
     enum RawDataBlockType elem_type, elem_type_prev = TYPE_END;
 
23
     int err, elem_id, data_size_tmp;
 
24
-    int samples = 0, multiplier;
 
25
+    int samples = 0, multiplier, audio_found = 0;
 
26
 
 
27
     if (show_bits(gb, 12) == 0xfff) {
 
28
         if (parse_adts_frame_header(ac, gb) < 0) {
 
29
@@ -2105,10 +2105,12 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
 
30
 
 
31
         case TYPE_SCE:
 
32
             err = decode_ics(ac, &che->ch[0], gb, 0, 0);
 
33
+            audio_found = 1;
 
34
             break;
 
35
 
 
36
         case TYPE_CPE:
 
37
             err = decode_cpe(ac, gb, che);
 
38
+            audio_found = 1;
 
39
             break;
 
40
 
 
41
         case TYPE_CCE:
 
42
@@ -2117,6 +2119,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
 
43
 
 
44
         case TYPE_LFE:
 
45
             err = decode_ics(ac, &che->ch[0], gb, 0, 0);
 
46
+            audio_found = 1;
 
47
             break;
 
48
 
 
49
         case TYPE_DSE:
 
50
@@ -2193,7 +2196,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
 
51
                                                    samples, avctx->channels);
 
52
     }
 
53
 
 
54
-    if (ac->output_configured)
 
55
+    if (ac->output_configured && audio_found)
 
56
         ac->output_configured = OC_LOCKED;
 
57
 
 
58
     return 0;
 
59
-- 
 
60
1.7.4.1
 
61