~ubuntu-branches/ubuntu/utopic/ffmpeg-debian/utopic

« back to all changes in this revision

Viewing changes to libavcodec/eac3dec.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-01-20 09:20:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090120092053-izz63p40hc98qfgp
Tags: 3:0.svn20090119-1ubuntu1
* merge from debian. LP: #318501
* new version fixes CVE-2008-3230, LP: #253767

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 */
22
22
 
23
23
#include "avcodec.h"
 
24
#include "internal.h"
 
25
#include "aac_ac3_parser.h"
24
26
#include "ac3.h"
25
27
#include "ac3_parser.h"
26
28
#include "ac3dec.h"
182
184
       application can select from. each independent stream can also contain
183
185
       dependent streams which are used to add or replace channels. */
184
186
    if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT) {
185
 
        av_log_missing_feature(s->avctx, "Dependent substream decoding", 1);
186
 
        return AC3_PARSE_ERROR_FRAME_TYPE;
 
187
        ff_log_missing_feature(s->avctx, "Dependent substream decoding", 1);
 
188
        return AAC_AC3_PARSE_ERROR_FRAME_TYPE;
187
189
    } else if (s->frame_type == EAC3_FRAME_TYPE_RESERVED) {
188
190
        av_log(s->avctx, AV_LOG_ERROR, "Reserved frame type\n");
189
 
        return AC3_PARSE_ERROR_FRAME_TYPE;
 
191
        return AAC_AC3_PARSE_ERROR_FRAME_TYPE;
190
192
    }
191
193
 
192
194
    /* The substream id indicates which substream this frame belongs to. each
194
196
       associated to an independent stream have matching substream id's. */
195
197
    if (s->substreamid) {
196
198
        /* only decode substream with id=0. skip any additional substreams. */
197
 
        av_log_missing_feature(s->avctx, "Additional substreams", 1);
198
 
        return AC3_PARSE_ERROR_FRAME_TYPE;
 
199
        ff_log_missing_feature(s->avctx, "Additional substreams", 1);
 
200
        return AAC_AC3_PARSE_ERROR_FRAME_TYPE;
199
201
    }
200
202
 
201
203
    if (s->bit_alloc_params.sr_code == EAC3_SR_CODE_REDUCED) {
203
205
           rates in bit allocation.  The best assumption would be that it is
204
206
           handled like AC-3 DolbyNet, but we cannot be sure until we have a
205
207
           sample which utilizes this feature. */
206
 
        av_log_missing_feature(s->avctx, "Reduced sampling rates", 1);
 
208
        ff_log_missing_feature(s->avctx, "Reduced sampling rates", 1);
207
209
        return -1;
208
210
    }
209
211
    skip_bits(gbc, 5); // skip bitstream id
460
462
 
461
463
    /* spectral extension attenuation data */
462
464
    if (parse_spx_atten_data) {
463
 
        av_log_missing_feature(s->avctx, "Spectral extension attenuation", 1);
 
465
        ff_log_missing_feature(s->avctx, "Spectral extension attenuation", 1);
464
466
        for (ch = 1; ch <= s->fbw_channels; ch++) {
465
467
            if (get_bits1(gbc)) { // channel has spx attenuation
466
468
                skip_bits(gbc, 5); // skip spx attenuation code
475
477
           The spec does not say what this data is or what it's used for.
476
478
           It is likely the offset of each block within the frame. */
477
479
        int block_start_bits = (s->num_blocks-1) * (4 + av_log2(s->frame_size-2));
478
 
        skip_bits(gbc, block_start_bits);
 
480
        skip_bits_long(gbc, block_start_bits);
 
481
        ff_log_missing_feature(s->avctx, "Block start info", 1);
479
482
    }
480
483
 
481
484
    /* syntax state initialization */