~ubuntu-branches/ubuntu/utopic/libav/utopic

« back to all changes in this revision

Viewing changes to libavformat/omadec.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-12-21 15:32:13 UTC
  • mto: (1.2.18)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: package-import@ubuntu.com-20121221153213-fudzrugjzivtv0wp
Tags: upstream-9~beta3
ImportĀ upstreamĀ versionĀ 9~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 * CODEC SUPPORT: Only ATRAC3 codec is currently supported!
41
41
 */
42
42
 
 
43
#include "libavutil/channel_layout.h"
43
44
#include "avformat.h"
44
45
#include "internal.h"
45
46
#include "libavutil/intreadwrite.h"
46
47
#include "libavutil/des.h"
47
48
#include "oma.h"
48
49
#include "pcm.h"
49
 
#include "riff.h"
50
50
#include "id3v2.h"
51
51
 
52
52
 
312
312
            framesize = (codec_params & 0x3FF) * 8;
313
313
            jsflag = (codec_params >> 17) & 1; /* get stereo coding mode, 1 for joint-stereo */
314
314
            st->codec->channels    = 2;
 
315
            st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
315
316
            st->codec->sample_rate = samplerate;
316
317
            st->codec->bit_rate    = st->codec->sample_rate * framesize * 8 / 1024;
317
318
 
346
347
        case OMA_CODECID_LPCM:
347
348
            /* PCM 44.1 kHz 16 bit stereo big-endian */
348
349
            st->codec->channels = 2;
 
350
            st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
349
351
            st->codec->sample_rate = 44100;
350
352
            framesize = 1024;
351
353
            /* bit rate = sample rate x PCM block align (= 4) x 8 */