diff options
author | François Revol <revol@free.fr> | 2002-07-20 20:05:50 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-07-20 20:05:50 +0000 |
commit | 0147f198569a8e8d857df184d29ad22c8089b91e (patch) | |
tree | 706f7175941b7874bab8f3d79da53fe148c4f0e3 /libav/wav.c | |
parent | e1707f52d5a431bd645eb6026801e1ddaf9c79c5 (diff) | |
download | ffmpeg-0147f198569a8e8d857df184d29ad22c8089b91e.tar.gz |
beos/mov/adpcm patch by François Revol <revol at free dot fr>
* Some BeOS fixes:
- errno stuff
- nanosleep() replacement
- added a doc/README.beos
* mov reader still has problems with most videos (skips many chunks),
- It should now read .mov files with zlib-compressed moov headers (aka cmov)
- added SVQ1 support.
- removed mapping 'raw ' and 'yuv2' to h263, was my mistake.
- added IMA4 support. (tested)
- fixed frame rate (it reported 0 fps or something before)
- extended file probing ('wide' and 'free' atoms)
- improved .mov/.mp4 detection (or so I think)
* adpcm
* added zlib support, with header file and lib check
Originally committed as revision 780 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libav/wav.c')
-rw-r--r-- | libav/wav.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libav/wav.c b/libav/wav.c index cab5a94a68..b8946cf7a9 100644 --- a/libav/wav.c +++ b/libav/wav.c @@ -27,6 +27,8 @@ CodecTag codec_wav_tags[] = { { CODEC_ID_PCM_U8, 0x01 }, /* must come after s16le in this list */ { CODEC_ID_PCM_ALAW, 0x06 }, { CODEC_ID_PCM_MULAW, 0x07 }, + { CODEC_ID_ADPCM_MS, 0x02 }, + { CODEC_ID_ADPCM_IMA_WAV, 0x11 }, { 0, 0 }, }; @@ -56,6 +58,8 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc) if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3LAME) { blkalign = 1; //blkalign = 144 * enc->bit_rate/enc->sample_rate; + } else if (enc->block_align != 0) { /* specified by the codec */ + blkalign = enc->block_align; } else blkalign = enc->channels*bps >> 3; if (enc->codec_id == CODEC_ID_PCM_U8 || @@ -205,6 +209,7 @@ static int wav_read_header(AVFormatContext *s, unsigned int tag; ByteIOContext *pb = &s->pb; unsigned int id, channels, rate, bit_rate, extra_size, bps; + unsigned int blkalign; AVStream *st; /* check RIFF header */ @@ -225,7 +230,7 @@ static int wav_read_header(AVFormatContext *s, channels = get_le16(pb); rate = get_le32(pb); bit_rate = get_le32(pb) * 8; - get_le16(pb); /* block align */ + blkalign = get_le16(pb); /* block align */ bps = get_le16(pb); /* bits per sample */ if (size >= 18) { /* wav_extra_size */ @@ -248,6 +253,7 @@ static int wav_read_header(AVFormatContext *s, st->codec.codec_id = wav_codec_get_id(id, bps); st->codec.channels = channels; st->codec.sample_rate = rate; + st->codec.block_align = blkalign; return 0; } |