diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2007-10-18 23:36:12 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2007-10-18 23:36:12 +0000 |
commit | ffbd0bcdb6a122a240d178fe494ee0cf4d9aea5e (patch) | |
tree | a8a4e393f9657fe9b36fff3519829328a80a2ff4 /libavformat/electronicarts.c | |
parent | 597958ada78b8d989130f9fcc670a891cd70dd65 (diff) | |
download | ffmpeg-ffbd0bcdb6a122a240d178fe494ee0cf4d9aea5e.tar.gz |
set bytes per sample in the context
Originally committed as revision 10802 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/electronicarts.c')
-rw-r--r-- | libavformat/electronicarts.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index 7aaff86e9d..02099545f4 100644 --- a/libavformat/electronicarts.c +++ b/libavformat/electronicarts.c @@ -35,8 +35,6 @@ #define MV0K_TAG MKTAG('M', 'V', '0', 'K') #define MV0F_TAG MKTAG('M', 'V', '0', 'F') -#define EA_BITS_PER_SAMPLE 16 - typedef struct EaDemuxContext { int big_endian; @@ -50,6 +48,7 @@ typedef struct EaDemuxContext { int64_t audio_pts; + int bytes; int sample_rate; int num_channels; int num_samples; @@ -83,6 +82,7 @@ static int process_audio_header_elements(AVFormatContext *s) ByteIOContext *pb = &s->pb; int compression_type = -1, revision = -1; + ea->bytes = 2; ea->sample_rate = -1; ea->num_channels = 1; @@ -267,7 +267,7 @@ static int ea_read_header(AVFormatContext *s, st->codec->codec_tag = 0; /* no tag */ st->codec->channels = ea->num_channels; st->codec->sample_rate = ea->sample_rate; - st->codec->bits_per_sample = EA_BITS_PER_SAMPLE; + st->codec->bits_per_sample = ea->bytes * 8; st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * st->codec->bits_per_sample / 4; st->codec->block_align = st->codec->channels * st->codec->bits_per_sample; |