Mercurial > libavformat.hg
changeset 2642:6a53777da0c9 libavformat
set bytes per sample in the context
author | aurel |
---|---|
date | Thu, 18 Oct 2007 23:36:12 +0000 |
parents | 9725a5726fec |
children | 3ffeea972e03 |
files | electronicarts.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/electronicarts.c Thu Oct 18 23:22:50 2007 +0000 +++ b/electronicarts.c Thu Oct 18 23:36:12 2007 +0000 @@ -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 @@ int64_t audio_pts; + int bytes; int sample_rate; int num_channels; int num_samples; @@ -83,6 +82,7 @@ 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 @@ 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;