mirror of https://git.ffmpeg.org/ffmpeg.git
provisions for raw PCM audio
Originally committed as revision 2291 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
d86e8568e6
commit
b59ebf6220
|
@ -133,6 +133,12 @@ static int load_ipmovie_packet(IPMVEContext *s, ByteIOContext *pb,
|
||||||
|
|
||||||
if (s->audio_chunk_offset) {
|
if (s->audio_chunk_offset) {
|
||||||
|
|
||||||
|
/* adjust for PCM audio by skipping chunk header */
|
||||||
|
if (s->audio_type != CODEC_ID_INTERPLAY_DPCM) {
|
||||||
|
s->audio_chunk_offset += 6;
|
||||||
|
s->audio_chunk_size -= 6;
|
||||||
|
}
|
||||||
|
|
||||||
url_fseek(pb, s->audio_chunk_offset, SEEK_SET);
|
url_fseek(pb, s->audio_chunk_offset, SEEK_SET);
|
||||||
s->audio_chunk_offset = 0;
|
s->audio_chunk_offset = 0;
|
||||||
|
|
||||||
|
@ -568,8 +574,9 @@ static int ipmovie_read_header(AVFormatContext *s,
|
||||||
st->codec.sample_rate = ipmovie->audio_sample_rate;
|
st->codec.sample_rate = ipmovie->audio_sample_rate;
|
||||||
st->codec.bits_per_sample = ipmovie->audio_bits;
|
st->codec.bits_per_sample = ipmovie->audio_bits;
|
||||||
st->codec.bit_rate = st->codec.channels * st->codec.sample_rate *
|
st->codec.bit_rate = st->codec.channels * st->codec.sample_rate *
|
||||||
st->codec.bits_per_sample /
|
st->codec.bits_per_sample;
|
||||||
(st->codec.codec_id == CODEC_ID_INTERPLAY_DPCM) ? 2 : 1;
|
if (st->codec.codec_id == CODEC_ID_INTERPLAY_DPCM)
|
||||||
|
st->codec.bit_rate /= 2;
|
||||||
st->codec.block_align = st->codec.channels * st->codec.bits_per_sample;
|
st->codec.block_align = st->codec.channels * st->codec.bits_per_sample;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue