Mercurial > libavformat.hg
changeset 3908:1d3d17de20ba libavformat
Bump Major version, this commit is almost just renaming bits_per_sample to
bits_per_coded_sample but that cannot be done seperately.
Patch by Luca Abeni
Also reset the minor version and fix the forgotton change to libfaad.
Note: The API/ABI should not be considered stable yet, there still may
be a change done here or there if some developer has some cleanup ideas and
patches!
author | michael |
---|---|
date | Mon, 08 Sep 2008 14:24:59 +0000 |
parents | 7c71e9cabf0e |
children | 214c1c37be6f |
files | 4xm.c aiff.c apc.c ape.c asf.c avidec.c avs.c bethsoftvid.c bfi.c daud.c dsicin.c electronicarts.c flvdec.c flvenc.c gxf.c idcin.c idroq.c iff.c ipmovie.c mmf.c mov.c movenc.c mpc.c mpc8.c mpeg.c mtv.c mvi.c mxfdec.c mxfenc.c nsvdec.c nuv.c riff.c rl2.c rpl.c segafilm.c sierravmd.c siff.c smacker.c tiertexseq.c tta.c utils.c vocdec.c vocenc.c wc3movie.c westwood.c wv.c xa.c |
diffstat | 47 files changed, 137 insertions(+), 137 deletions(-) [+] |
line wrap: on
line diff
--- a/4xm.c Mon Sep 08 00:58:24 2008 +0000 +++ b/4xm.c Mon Sep 08 14:24:59 2008 +0000 @@ -193,13 +193,13 @@ st->codec->codec_tag = 0; st->codec->channels = fourxm->tracks[current_track].channels; st->codec->sample_rate = fourxm->tracks[current_track].sample_rate; - st->codec->bits_per_sample = fourxm->tracks[current_track].bits; + st->codec->bits_per_coded_sample = fourxm->tracks[current_track].bits; st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * - st->codec->bits_per_sample; - st->codec->block_align = st->codec->channels * st->codec->bits_per_sample; + st->codec->bits_per_coded_sample; + st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample; if (fourxm->tracks[current_track].adpcm) st->codec->codec_id = CODEC_ID_ADPCM_4XM; - else if (st->codec->bits_per_sample == 8) + else if (st->codec->bits_per_coded_sample == 8) st->codec->codec_id = CODEC_ID_PCM_U8; else st->codec->codec_id = CODEC_ID_PCM_S16LE;
--- a/aiff.c Mon Sep 08 00:58:24 2008 +0000 +++ b/aiff.c Mon Sep 08 14:24:59 2008 +0000 @@ -112,7 +112,7 @@ codec->codec_type = CODEC_TYPE_AUDIO; codec->channels = get_be16(pb); num_frames = get_be32(pb); - codec->bits_per_sample = get_be16(pb); + codec->bits_per_coded_sample = get_be16(pb); get_buffer(pb, (uint8_t*)&ext, sizeof(ext));/* Sample rate is in */ sample_rate = av_ext2dbl(ext); /* 80 bits BE IEEE extended float */ @@ -126,8 +126,8 @@ switch (codec->codec_id) { case CODEC_ID_PCM_S16BE: - codec->codec_id = aiff_codec_get_id(codec->bits_per_sample); - codec->bits_per_sample = av_get_bits_per_sample(codec->codec_id); + codec->codec_id = aiff_codec_get_id(codec->bits_per_coded_sample); + codec->bits_per_coded_sample = av_get_bits_per_sample(codec->codec_id); break; case CODEC_ID_ADPCM_IMA_QT: codec->block_align = 34*codec->channels; @@ -151,14 +151,14 @@ size -= 4; } else { /* Need the codec type */ - codec->codec_id = aiff_codec_get_id(codec->bits_per_sample); - codec->bits_per_sample = av_get_bits_per_sample(codec->codec_id); + codec->codec_id = aiff_codec_get_id(codec->bits_per_coded_sample); + codec->bits_per_coded_sample = av_get_bits_per_sample(codec->codec_id); } /* Block align needs to be computed in all cases, as the definition * is specific to applications -> here we use the WAVE format definition */ if (!codec->block_align) - codec->block_align = (codec->bits_per_sample * codec->channels) >> 3; + codec->block_align = (codec->bits_per_coded_sample * codec->channels) >> 3; codec->bit_rate = (codec->frame_size ? codec->sample_rate/codec->frame_size : codec->sample_rate) * (codec->block_align << 3); @@ -198,7 +198,7 @@ put_tag(pb, aifc ? "AIFC" : "AIFF"); if (aifc) { // compressed audio - enc->bits_per_sample = 16; + enc->bits_per_coded_sample = 16; if (!enc->block_align) { av_log(s, AV_LOG_ERROR, "block align not set\n"); return -1; @@ -217,16 +217,16 @@ aiff->frames = url_ftell(pb); put_be32(pb, 0); /* Number of frames */ - if (!enc->bits_per_sample) - enc->bits_per_sample = av_get_bits_per_sample(enc->codec_id); - if (!enc->bits_per_sample) { + if (!enc->bits_per_coded_sample) + enc->bits_per_coded_sample = av_get_bits_per_sample(enc->codec_id); + if (!enc->bits_per_coded_sample) { av_log(s, AV_LOG_ERROR, "could not compute bits per sample\n"); return -1; } if (!enc->block_align) - enc->block_align = (enc->bits_per_sample * enc->channels) >> 3; + enc->block_align = (enc->bits_per_coded_sample * enc->channels) >> 3; - put_be16(pb, enc->bits_per_sample); /* Sample size */ + put_be16(pb, enc->bits_per_coded_sample); /* Sample size */ sample_rate = av_dbl2ext((double)enc->sample_rate); put_buffer(pb, (uint8_t*)&sample_rate, sizeof(sample_rate));
--- a/apc.c Mon Sep 08 00:58:24 2008 +0000 +++ b/apc.c Mon Sep 08 14:24:59 2008 +0000 @@ -62,8 +62,8 @@ if (get_le32(pb)) st->codec->channels = 2; - st->codec->bits_per_sample = 4; - st->codec->bit_rate = st->codec->bits_per_sample * st->codec->channels + st->codec->bits_per_coded_sample = 4; + st->codec->bit_rate = st->codec->bits_per_coded_sample * st->codec->channels * st->codec->sample_rate; st->codec->block_align = 1;
--- a/ape.c Mon Sep 08 00:58:24 2008 +0000 +++ b/ape.c Mon Sep 08 14:24:59 2008 +0000 @@ -424,7 +424,7 @@ st->codec->codec_tag = MKTAG('A', 'P', 'E', ' '); st->codec->channels = ape->channels; st->codec->sample_rate = ape->samplerate; - st->codec->bits_per_sample = ape->bps; + st->codec->bits_per_coded_sample = ape->bps; st->codec->frame_size = MAC_SUBFRAME_SIZE; st->nb_frames = ape->totalframes;
--- a/asf.c Mon Sep 08 00:58:24 2008 +0000 +++ b/asf.c Mon Sep 08 14:24:59 2008 +0000 @@ -315,7 +315,7 @@ st->codec->height = get_le32(pb); /* not available for asf */ get_le16(pb); /* panes */ - st->codec->bits_per_sample = get_le16(pb); /* depth */ + st->codec->bits_per_coded_sample = get_le16(pb); /* depth */ tag1 = get_le32(pb); url_fskip(pb, 20); // av_log(NULL, AV_LOG_DEBUG, "size:%d tsize:%d sizeX:%d\n", size, total_size, sizeX); @@ -329,7 +329,7 @@ /* Extract palette from extradata if bpp <= 8 */ /* This code assumes that extradata contains only palette */ /* This is true for all paletted codecs implemented in ffmpeg */ - if (st->codec->extradata_size && (st->codec->bits_per_sample <= 8)) { + if (st->codec->extradata_size && (st->codec->bits_per_coded_sample <= 8)) { st->codec->palctrl = av_mallocz(sizeof(AVPaletteControl)); #ifdef WORDS_BIGENDIAN for (i = 0; i < FFMIN(st->codec->extradata_size, AVPALETTE_SIZE)/4; i++)
--- a/avidec.c Mon Sep 08 00:58:24 2008 +0000 +++ b/avidec.c Mon Sep 08 14:24:59 2008 +0000 @@ -445,7 +445,7 @@ st->codec->width = get_le32(pb); st->codec->height = get_le32(pb); get_le16(pb); /* panes */ - st->codec->bits_per_sample= get_le16(pb); /* depth */ + st->codec->bits_per_coded_sample= get_le16(pb); /* depth */ tag1 = get_le32(pb); get_le32(pb); /* ImageSize */ get_le32(pb); /* XPelsPerMeter */ @@ -472,7 +472,7 @@ /* Extract palette from extradata if bpp <= 8. */ /* This code assumes that extradata contains only palette. */ /* This is true for all paletted codecs implemented in FFmpeg. */ - if (st->codec->extradata_size && (st->codec->bits_per_sample <= 8)) { + if (st->codec->extradata_size && (st->codec->bits_per_coded_sample <= 8)) { st->codec->palctrl = av_mallocz(sizeof(AVPaletteControl)); #ifdef WORDS_BIGENDIAN for (i = 0; i < FFMIN(st->codec->extradata_size, AVPALETTE_SIZE)/4; i++)
--- a/avs.c Mon Sep 08 00:58:24 2008 +0000 +++ b/avs.c Mon Sep 08 14:24:59 2008 +0000 @@ -182,7 +182,7 @@ avs->st_video->codec->codec_id = CODEC_ID_AVS; avs->st_video->codec->width = avs->width; avs->st_video->codec->height = avs->height; - avs->st_video->codec->bits_per_sample=avs->bits_per_sample; + avs->st_video->codec->bits_per_coded_sample=avs->bits_per_sample; avs->st_video->nb_frames = avs->nb_frames; avs->st_video->codec->time_base = (AVRational) { 1, avs->fps};
--- a/bethsoftvid.c Mon Sep 08 00:58:24 2008 +0000 +++ b/bethsoftvid.c Mon Sep 08 14:24:59 2008 +0000 @@ -89,8 +89,8 @@ stream->codec->codec_id = CODEC_ID_PCM_U8; stream->codec->channels = 1; stream->codec->sample_rate = 11025; - stream->codec->bits_per_sample = 8; - stream->codec->bit_rate = stream->codec->channels * stream->codec->sample_rate * stream->codec->bits_per_sample; + stream->codec->bits_per_coded_sample = 8; + stream->codec->bit_rate = stream->codec->channels * stream->codec->sample_rate * stream->codec->bits_per_coded_sample; return 0; } @@ -197,7 +197,7 @@ get_le16(pb); // soundblaster DAC used for sample rate, as on specification page (link above) s->streams[1]->codec->sample_rate = 1000000 / (256 - get_byte(pb)); - s->streams[1]->codec->bit_rate = s->streams[1]->codec->channels * s->streams[1]->codec->sample_rate * s->streams[1]->codec->bits_per_sample; + s->streams[1]->codec->bit_rate = s->streams[1]->codec->channels * s->streams[1]->codec->sample_rate * s->streams[1]->codec->bits_per_coded_sample; case AUDIO_BLOCK: audio_length = get_le16(pb); ret_value = av_get_packet(pb, pkt, audio_length);
--- a/bfi.c Mon Sep 08 00:58:24 2008 +0000 +++ b/bfi.c Mon Sep 08 14:24:59 2008 +0000 @@ -94,9 +94,9 @@ astream->codec->codec_type = CODEC_TYPE_AUDIO; astream->codec->codec_id = CODEC_ID_PCM_U8; astream->codec->channels = 1; - astream->codec->bits_per_sample = 8; + astream->codec->bits_per_coded_sample = 8; astream->codec->bit_rate = - astream->codec->sample_rate * astream->codec->bits_per_sample; + astream->codec->sample_rate * astream->codec->bits_per_coded_sample; url_fseek(pb, chunk_header - 3, SEEK_SET); av_set_pts_info(astream, 64, 1, astream->codec->sample_rate); return 0;
--- a/daud.c Mon Sep 08 00:58:24 2008 +0000 +++ b/daud.c Mon Sep 08 14:24:59 2008 +0000 @@ -31,7 +31,7 @@ st->codec->sample_rate = 96000; st->codec->bit_rate = 3 * 6 * 96000 * 8; st->codec->block_align = 3 * 6; - st->codec->bits_per_sample = 24; + st->codec->bits_per_coded_sample = 24; return 0; }
--- a/dsicin.c Mon Sep 08 00:58:24 2008 +0000 +++ b/dsicin.c Mon Sep 08 14:24:59 2008 +0000 @@ -130,9 +130,9 @@ st->codec->codec_tag = 0; /* no tag */ st->codec->channels = 1; st->codec->sample_rate = 22050; - st->codec->bits_per_sample = 16; - st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_sample * st->codec->channels; - st->codec->block_align = st->codec->channels * st->codec->bits_per_sample; + st->codec->bits_per_coded_sample = 16; + st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_coded_sample * st->codec->channels; + st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample; return 0; }
--- a/electronicarts.c Mon Sep 08 00:58:24 2008 +0000 +++ b/electronicarts.c Mon Sep 08 14:24:59 2008 +0000 @@ -411,10 +411,10 @@ 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->bytes * 8; + st->codec->bits_per_coded_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; + st->codec->bits_per_coded_sample / 4; + st->codec->block_align = st->codec->channels*st->codec->bits_per_coded_sample; ea->audio_stream_index = st->index; ea->audio_frame_counter = 0; }
--- a/flvdec.c Mon Sep 08 00:58:24 2008 +0000 +++ b/flvdec.c Mon Sep 08 14:24:59 2008 +0000 @@ -42,7 +42,7 @@ switch(flv_codecid) { //no distinction between S16 and S8 PCM codec flags case FLV_CODECID_PCM: - acodec->codec_id = acodec->bits_per_sample == 8 ? CODEC_ID_PCM_S8 : + acodec->codec_id = acodec->bits_per_coded_sample == 8 ? CODEC_ID_PCM_S8 : #ifdef WORDS_BIGENDIAN CODEC_ID_PCM_S16BE; #else @@ -50,7 +50,7 @@ #endif break; case FLV_CODECID_PCM_LE: - acodec->codec_id = acodec->bits_per_sample == 8 ? CODEC_ID_PCM_S8 : CODEC_ID_PCM_S16LE; break; + acodec->codec_id = acodec->bits_per_coded_sample == 8 ? CODEC_ID_PCM_S8 : CODEC_ID_PCM_S16LE; break; case FLV_CODECID_AAC : acodec->codec_id = CODEC_ID_AAC; break; case FLV_CODECID_ADPCM: acodec->codec_id = CODEC_ID_ADPCM_SWF; break; case FLV_CODECID_SPEEX: acodec->codec_id = CODEC_ID_SPEEX; break; @@ -185,7 +185,7 @@ else if(!strcmp(key, "videocodecid") && vcodec && 0 <= (int)num_val) flv_set_video_codec(s, vstream, (int)num_val); else if(!strcmp(key, "audiosamplesize") && acodec && 0 < (int)num_val) { - acodec->bits_per_sample = num_val; + acodec->bits_per_coded_sample = num_val; //we may have to rewrite a previously read codecid because FLV only marks PCM endianness. if(num_val == 8 && (acodec->codec_id == CODEC_ID_PCM_S16BE || acodec->codec_id == CODEC_ID_PCM_S16LE)) acodec->codec_id = CODEC_ID_PCM_S8; @@ -382,13 +382,13 @@ } if(is_audio){ - if(!st->codec->sample_rate || !st->codec->bits_per_sample || (!st->codec->codec_id && !st->codec->codec_tag)) { + if(!st->codec->sample_rate || !st->codec->bits_per_coded_sample || (!st->codec->codec_id && !st->codec->codec_tag)) { st->codec->channels = (flags & FLV_AUDIO_CHANNEL_MASK) == FLV_STEREO ? 2 : 1; if((flags & FLV_AUDIO_CODECID_MASK) == FLV_CODECID_NELLYMOSER_8HZ_MONO) st->codec->sample_rate= 8000; else st->codec->sample_rate = (44100 << ((flags & FLV_AUDIO_SAMPLERATE_MASK) >> FLV_AUDIO_SAMPLERATE_OFFSET) >> 3); - st->codec->bits_per_sample = (flags & FLV_AUDIO_SAMPLESIZE_MASK) ? 16 : 8; + st->codec->bits_per_coded_sample = (flags & FLV_AUDIO_SAMPLESIZE_MASK) ? 16 : 8; flv_set_audio_codec(s, st, flags & FLV_AUDIO_CODECID_MASK); } }else{
--- a/flvenc.c Mon Sep 08 00:58:24 2008 +0000 +++ b/flvenc.c Mon Sep 08 14:24:59 2008 +0000 @@ -55,7 +55,7 @@ } FLVContext; static int get_audio_flags(AVCodecContext *enc){ - int flags = (enc->bits_per_sample == 16) ? FLV_SAMPLESSIZE_16BIT : FLV_SAMPLESSIZE_8BIT; + int flags = (enc->bits_per_coded_sample == 16) ? FLV_SAMPLESSIZE_16BIT : FLV_SAMPLESSIZE_8BIT; if (enc->codec_id == CODEC_ID_AAC) // specs force these parameters return FLV_CODECID_AAC | FLV_SAMPLERATE_44100HZ | FLV_SAMPLESSIZE_16BIT | FLV_STEREO;
--- a/gxf.c Mon Sep 08 00:58:24 2008 +0000 +++ b/gxf.c Mon Sep 08 14:24:59 2008 +0000 @@ -120,7 +120,7 @@ st->codec->sample_rate = 48000; st->codec->bit_rate = 3 * 1 * 48000 * 8; st->codec->block_align = 3 * 1; - st->codec->bits_per_sample = 24; + st->codec->bits_per_coded_sample = 24; break; case 10: st->codec->codec_type = CODEC_TYPE_AUDIO; @@ -129,7 +129,7 @@ st->codec->sample_rate = 48000; st->codec->bit_rate = 2 * 1 * 48000 * 8; st->codec->block_align = 2 * 1; - st->codec->bits_per_sample = 16; + st->codec->bits_per_coded_sample = 16; break; case 17: st->codec->codec_type = CODEC_TYPE_AUDIO;
--- a/idcin.c Mon Sep 08 00:58:24 2008 +0000 +++ b/idcin.c Mon Sep 08 14:24:59 2008 +0000 @@ -181,7 +181,7 @@ st->codec->codec_tag = 1; st->codec->channels = channels; st->codec->sample_rate = sample_rate; - st->codec->bits_per_sample = bytes_per_sample * 8; + st->codec->bits_per_coded_sample = bytes_per_sample * 8; st->codec->bit_rate = sample_rate * bytes_per_sample * 8 * channels; st->codec->block_align = bytes_per_sample * channels; if (bytes_per_sample == 1)
--- a/idroq.c Mon Sep 08 00:58:24 2008 +0000 +++ b/idroq.c Mon Sep 08 14:24:59 2008 +0000 @@ -161,10 +161,10 @@ st->codec->codec_tag = 0; /* no tag */ st->codec->channels = roq->audio_channels; st->codec->sample_rate = RoQ_AUDIO_SAMPLE_RATE; - st->codec->bits_per_sample = 16; + st->codec->bits_per_coded_sample = 16; st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * - st->codec->bits_per_sample; - st->codec->block_align = st->codec->channels * st->codec->bits_per_sample; + st->codec->bits_per_coded_sample; + st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample; } return 0;
--- a/iff.c Mon Sep 08 00:58:24 2008 +0000 +++ b/iff.c Mon Sep 08 14:24:59 2008 +0000 @@ -149,9 +149,9 @@ return -1; } - st->codec->bits_per_sample = 8; - st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * st->codec->bits_per_sample; - st->codec->block_align = st->codec->channels * st->codec->bits_per_sample; + st->codec->bits_per_coded_sample = 8; + st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * st->codec->bits_per_coded_sample; + st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample; return 0; }
--- a/ipmovie.c Mon Sep 08 00:58:24 2008 +0000 +++ b/ipmovie.c Mon Sep 08 14:24:59 2008 +0000 @@ -574,12 +574,12 @@ st->codec->codec_tag = 0; /* no tag */ st->codec->channels = ipmovie->audio_channels; st->codec->sample_rate = ipmovie->audio_sample_rate; - st->codec->bits_per_sample = ipmovie->audio_bits; + st->codec->bits_per_coded_sample = ipmovie->audio_bits; st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * - st->codec->bits_per_sample; + st->codec->bits_per_coded_sample; 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_coded_sample; } return 0;
--- a/mmf.c Mon Sep 08 00:58:24 2008 +0000 +++ b/mmf.c Mon Sep 08 14:24:59 2008 +0000 @@ -248,8 +248,8 @@ st->codec->codec_id = CODEC_ID_ADPCM_YAMAHA; st->codec->sample_rate = rate; st->codec->channels = 1; - st->codec->bits_per_sample = 4; - st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_sample; + st->codec->bits_per_coded_sample = 4; + st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_coded_sample; av_set_pts_info(st, 64, 1, st->codec->sample_rate);
--- a/mov.c Mon Sep 08 00:58:24 2008 +0000 +++ b/mov.c Mon Sep 08 14:24:59 2008 +0000 @@ -796,13 +796,13 @@ st->codec->codec_name[codec_name[0]] = 0; } - st->codec->bits_per_sample = get_be16(pb); /* depth */ + st->codec->bits_per_coded_sample = get_be16(pb); /* depth */ st->codec->color_table_id = get_be16(pb); /* colortable id */ dprintf(c->fc, "depth %d, ctab id %d\n", - st->codec->bits_per_sample, st->codec->color_table_id); + st->codec->bits_per_coded_sample, st->codec->color_table_id); /* figure out the palette situation */ - color_depth = st->codec->bits_per_sample & 0x1F; - color_greyscale = st->codec->bits_per_sample & 0x20; + color_depth = st->codec->bits_per_coded_sample & 0x1F; + color_greyscale = st->codec->bits_per_coded_sample & 0x20; /* if the depth is 2, 4, or 8 bpp, file is palettized */ if ((color_depth == 2) || (color_depth == 4) || @@ -814,7 +814,7 @@ if (color_greyscale) { int color_index, color_dec; /* compute the greyscale palette */ - st->codec->bits_per_sample = color_depth; + st->codec->bits_per_coded_sample = color_depth; color_count = 1 << color_depth; color_index = 255; color_dec = 256 / (color_count - 1); @@ -882,7 +882,7 @@ st->codec->channels = get_be16(pb); /* channel count */ dprintf(c->fc, "audio channels %d\n", st->codec->channels); - st->codec->bits_per_sample = get_be16(pb); /* sample size */ + st->codec->bits_per_coded_sample = get_be16(pb); /* sample size */ sc->audio_cid = get_be16(pb); get_be16(pb); /* packet size = 0 */ @@ -902,26 +902,26 @@ st->codec->sample_rate = av_int2dbl(get_be64(pb)); /* float 64 */ st->codec->channels = get_be32(pb); get_be32(pb); /* always 0x7F000000 */ - st->codec->bits_per_sample = get_be32(pb); /* bits per channel if sound is uncompressed */ + st->codec->bits_per_coded_sample = get_be32(pb); /* bits per channel if sound is uncompressed */ flags = get_be32(pb); /* lcpm format specific flag */ sc->bytes_per_frame = get_be32(pb); /* bytes per audio packet if constant */ sc->samples_per_frame = get_be32(pb); /* lpcm frames per audio packet if constant */ if (format == MKTAG('l','p','c','m')) - st->codec->codec_id = mov_get_lpcm_codec_id(st->codec->bits_per_sample, flags); + st->codec->codec_id = mov_get_lpcm_codec_id(st->codec->bits_per_coded_sample, flags); } } switch (st->codec->codec_id) { case CODEC_ID_PCM_S8: case CODEC_ID_PCM_U8: - if (st->codec->bits_per_sample == 16) + if (st->codec->bits_per_coded_sample == 16) st->codec->codec_id = CODEC_ID_PCM_S16BE; break; case CODEC_ID_PCM_S16LE: case CODEC_ID_PCM_S16BE: - if (st->codec->bits_per_sample == 8) + if (st->codec->bits_per_coded_sample == 8) st->codec->codec_id = CODEC_ID_PCM_S8; - else if (st->codec->bits_per_sample == 24) + else if (st->codec->bits_per_coded_sample == 24) st->codec->codec_id = st->codec->codec_id == CODEC_ID_PCM_S16BE ? CODEC_ID_PCM_S24BE : CODEC_ID_PCM_S24LE; @@ -949,7 +949,7 @@ bits_per_sample = av_get_bits_per_sample(st->codec->codec_id); if (bits_per_sample) { - st->codec->bits_per_sample = bits_per_sample; + st->codec->bits_per_coded_sample = bits_per_sample; sc->sample_size = (bits_per_sample >> 3) * st->codec->channels; } } else if(st->codec->codec_type==CODEC_TYPE_SUBTITLE){
--- a/movenc.c Mon Sep 08 00:58:24 2008 +0000 +++ b/movenc.c Mon Sep 08 14:24:59 2008 +0000 @@ -684,8 +684,8 @@ put_byte(pb, strlen(compressor_name)); put_buffer(pb, compressor_name, 31); - if (track->mode == MODE_MOV && track->enc->bits_per_sample) - put_be16(pb, track->enc->bits_per_sample); + if (track->mode == MODE_MOV && track->enc->bits_per_coded_sample) + put_be16(pb, track->enc->bits_per_coded_sample); else put_be16(pb, 0x18); /* Reserved */ put_be16(pb, 0xffff); /* Reserved */
--- a/mpc.c Mon Sep 08 00:58:24 2008 +0000 +++ b/mpc.c Mon Sep 08 14:24:59 2008 +0000 @@ -97,7 +97,7 @@ st->codec->codec_type = CODEC_TYPE_AUDIO; st->codec->codec_id = CODEC_ID_MUSEPACK7; st->codec->channels = 2; - st->codec->bits_per_sample = 16; + st->codec->bits_per_coded_sample = 16; st->codec->extradata_size = 16; st->codec->extradata = av_mallocz(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE);
--- a/mpc8.c Mon Sep 08 00:58:24 2008 +0000 +++ b/mpc8.c Mon Sep 08 14:24:59 2008 +0000 @@ -182,7 +182,7 @@ return AVERROR(ENOMEM); st->codec->codec_type = CODEC_TYPE_AUDIO; st->codec->codec_id = CODEC_ID_MUSEPACK8; - st->codec->bits_per_sample = 16; + st->codec->bits_per_coded_sample = 16; st->codec->extradata_size = 2; st->codec->extradata = av_mallocz(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
--- a/mpeg.c Mon Sep 08 00:58:24 2008 +0000 +++ b/mpeg.c Mon Sep 08 14:24:59 2008 +0000 @@ -520,13 +520,13 @@ freq = (b1 >> 4) & 3; st->codec->sample_rate = lpcm_freq_tab[freq]; st->codec->channels = 1 + (b1 & 7); - st->codec->bits_per_sample = 16 + ((b1 >> 6) & 3) * 4; + st->codec->bits_per_coded_sample = 16 + ((b1 >> 6) & 3) * 4; st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * - st->codec->bits_per_sample; - if (st->codec->bits_per_sample == 16) + st->codec->bits_per_coded_sample; + if (st->codec->bits_per_coded_sample == 16) st->codec->codec_id = CODEC_ID_PCM_S16BE; - else if (st->codec->bits_per_sample == 28) + else if (st->codec->bits_per_coded_sample == 28) return AVERROR(EINVAL); } av_new_packet(pkt, len);
--- a/mtv.c Mon Sep 08 00:58:24 2008 +0000 +++ b/mtv.c Mon Sep 08 14:24:59 2008 +0000 @@ -102,7 +102,7 @@ st->codec->codec_tag = MKTAG('R', 'G', 'B', mtv->img_bpp); st->codec->width = mtv->img_width; st->codec->height = mtv->img_height; - st->codec->bits_per_sample = mtv->img_bpp; + st->codec->bits_per_coded_sample = mtv->img_bpp; st->codec->sample_rate = mtv->video_fps; /* audio - mp3 */
--- a/mvi.c Mon Sep 08 00:58:24 2008 +0000 +++ b/mvi.c Mon Sep 08 14:24:59 2008 +0000 @@ -80,7 +80,7 @@ ast->codec->codec_type = CODEC_TYPE_AUDIO; ast->codec->codec_id = CODEC_ID_PCM_U8; ast->codec->channels = 1; - ast->codec->bits_per_sample = 8; + ast->codec->bits_per_coded_sample = 8; ast->codec->bit_rate = ast->codec->sample_rate * 8; av_set_pts_info(vst, 64, msecs_per_frame, 1000000);
--- a/mxfdec.c Mon Sep 08 00:58:24 2008 +0000 +++ b/mxfdec.c Mon Sep 08 14:24:59 2008 +0000 @@ -222,7 +222,7 @@ for (; buf_ptr < end_ptr; ) { for (i = 0; i < st->codec->channels; i++) { uint32_t sample = bytestream_get_le32(&buf_ptr); - if (st->codec->bits_per_sample == 24) + if (st->codec->bits_per_coded_sample == 24) bytestream_put_le24(&data_ptr, (sample >> 4) & 0xffffff); else bytestream_put_le16(&data_ptr, (sample >> 12) & 0xffff); @@ -788,7 +788,7 @@ st->codec->codec_id = container_ul->id; st->codec->width = descriptor->width; st->codec->height = descriptor->height; - st->codec->bits_per_sample = descriptor->bits_per_sample; /* Uncompressed */ + st->codec->bits_per_coded_sample = descriptor->bits_per_sample; /* Uncompressed */ st->sample_aspect_ratio = descriptor->aspect_ratio; st->need_parsing = AVSTREAM_PARSE_HEADERS; } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) { @@ -796,7 +796,7 @@ if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = container_ul->id; st->codec->channels = descriptor->channels; - st->codec->bits_per_sample = descriptor->bits_per_sample; + st->codec->bits_per_coded_sample = descriptor->bits_per_sample; st->codec->sample_rate = descriptor->sample_rate.num / descriptor->sample_rate.den; /* TODO: implement CODEC_ID_RAWAUDIO */ if (st->codec->codec_id == CODEC_ID_PCM_S16LE) {
--- a/mxfenc.c Mon Sep 08 00:58:24 2008 +0000 +++ b/mxfenc.c Mon Sep 08 14:24:59 2008 +0000 @@ -588,7 +588,7 @@ put_be32(pb, st->codec->channels); mxf_write_local_tag(pb, 4, 0x3D01); - put_be32(pb, st->codec->bits_per_sample); + put_be32(pb, st->codec->bits_per_coded_sample); } static void mxf_write_package(AVFormatContext *s, enum MXFMetadataSetType type)
--- a/nsvdec.c Mon Sep 08 00:58:24 2008 +0000 +++ b/nsvdec.c Mon Sep 08 14:24:59 2008 +0000 @@ -456,7 +456,7 @@ st->codec->codec_id = codec_get_id(nsv_codec_video_tags, vtag); st->codec->width = vwidth; st->codec->height = vheight; - st->codec->bits_per_sample = 24; /* depth XXX */ + st->codec->bits_per_coded_sample = 24; /* depth XXX */ av_set_pts_info(st, 64, framerate.den, framerate.num); st->start_time = 0;
--- a/nuv.c Mon Sep 08 00:58:24 2008 +0000 +++ b/nuv.c Mon Sep 08 14:24:59 2008 +0000 @@ -93,11 +93,11 @@ if (ast) { ast->codec->codec_tag = get_le32(pb); ast->codec->sample_rate = get_le32(pb); - ast->codec->bits_per_sample = get_le32(pb); + ast->codec->bits_per_coded_sample = get_le32(pb); ast->codec->channels = get_le32(pb); ast->codec->codec_id = wav_codec_get_id(ast->codec->codec_tag, - ast->codec->bits_per_sample); + ast->codec->bits_per_coded_sample); ast->need_parsing = AVSTREAM_PARSE_FULL; } else url_fskip(pb, 4 * 4); @@ -157,7 +157,7 @@ vst->codec->codec_id = CODEC_ID_NUV; vst->codec->width = width; vst->codec->height = height; - vst->codec->bits_per_sample = 10; + vst->codec->bits_per_coded_sample = 10; vst->sample_aspect_ratio = av_d2q(aspect * height / width, 10000); vst->r_frame_rate = av_d2q(fps, 60000); av_set_pts_info(vst, 32, 1, 1000); @@ -175,7 +175,7 @@ ast->codec->sample_rate = 44100; ast->codec->bit_rate = 2 * 2 * 44100 * 8; ast->codec->block_align = 2 * 2; - ast->codec->bits_per_sample = 16; + ast->codec->bits_per_coded_sample = 16; av_set_pts_info(ast, 32, 1, 1000); } else ctx->a_id = -1;
--- a/riff.c Mon Sep 08 00:58:24 2008 +0000 +++ b/riff.c Mon Sep 08 14:24:59 2008 +0000 @@ -251,8 +251,8 @@ if (!(bps = av_get_bits_per_sample(enc->codec_id))) bps = 16; // default to 16 } - if(bps != enc->bits_per_sample && enc->bits_per_sample){ - av_log(enc, AV_LOG_WARNING, "requested bits_per_sample (%d) and actually stored (%d) differ\n", enc->bits_per_sample, bps); + if(bps != enc->bits_per_coded_sample && enc->bits_per_coded_sample){ + av_log(enc, AV_LOG_WARNING, "requested bits_per_coded_sample (%d) and actually stored (%d) differ\n", enc->bits_per_coded_sample, bps); } if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3 || enc->codec_id == CODEC_ID_AC3) { @@ -327,7 +327,7 @@ put_le32(pb, enc->height); put_le16(pb, 1); /* planes */ - put_le16(pb, enc->bits_per_sample ? enc->bits_per_sample : 24); /* depth */ + put_le16(pb, enc->bits_per_coded_sample ? enc->bits_per_coded_sample : 24); /* depth */ /* compression type */ put_le32(pb, enc->codec_tag); put_le32(pb, enc->width * enc->height * 3); @@ -363,15 +363,15 @@ codec->bit_rate = get_le32(pb) * 8; codec->block_align = get_le16(pb); if (size == 14) { /* We're dealing with plain vanilla WAVEFORMAT */ - codec->bits_per_sample = 8; + codec->bits_per_coded_sample = 8; }else - codec->bits_per_sample = get_le16(pb); + codec->bits_per_coded_sample = get_le16(pb); if (size >= 18) { /* We're obviously dealing with WAVEFORMATEX */ int cbSize = get_le16(pb); /* cbSize */ size -= 18; cbSize = FFMIN(size, cbSize); if (cbSize >= 22 && id == 0xfffe) { /* WAVEFORMATEXTENSIBLE */ - codec->bits_per_sample = get_le16(pb); + codec->bits_per_coded_sample = get_le16(pb); get_le32(pb); /* dwChannelMask */ id = get_le32(pb); /* 4 first bytes of GUID */ url_fskip(pb, 12); /* skip end of GUID */ @@ -389,7 +389,7 @@ if (size > 0) url_fskip(pb, size); } - codec->codec_id = wav_codec_get_id(id, codec->bits_per_sample); + codec->codec_id = wav_codec_get_id(id, codec->bits_per_coded_sample); }
--- a/rl2.c Mon Sep 08 00:58:24 2008 +0000 +++ b/rl2.c Mon Sep 08 14:24:59 2008 +0000 @@ -148,12 +148,12 @@ st->codec->codec_id = CODEC_ID_PCM_U8; st->codec->codec_tag = 1; st->codec->channels = channels; - st->codec->bits_per_sample = 8; + st->codec->bits_per_coded_sample = 8; st->codec->sample_rate = rate; st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * - st->codec->bits_per_sample; + st->codec->bits_per_coded_sample; st->codec->block_align = st->codec->channels * - st->codec->bits_per_sample / 8; + st->codec->bits_per_coded_sample / 8; av_set_pts_info(st,32,1,rate); }
--- a/rpl.c Mon Sep 08 00:58:24 2008 +0000 +++ b/rpl.c Mon Sep 08 14:24:59 2008 +0000 @@ -142,7 +142,7 @@ vst->codec->codec_tag = read_line_and_int(pb, &error); // video format vst->codec->width = read_line_and_int(pb, &error); // video width vst->codec->height = read_line_and_int(pb, &error); // video height - vst->codec->bits_per_sample = read_line_and_int(pb, &error); // video bits per sample + vst->codec->bits_per_coded_sample = read_line_and_int(pb, &error); // video bits per sample error |= read_line(pb, line, sizeof(line)); // video frames per second fps = read_fps(line, &error); av_set_pts_info(vst, 32, fps.den, fps.num); @@ -157,7 +157,7 @@ case 124: vst->codec->codec_id = CODEC_ID_ESCAPE124; // The header is wrong here, at least sometimes - vst->codec->bits_per_sample = 16; + vst->codec->bits_per_coded_sample = 16; break; #if 0 case 130: @@ -184,20 +184,20 @@ ast->codec->codec_tag = audio_format; ast->codec->sample_rate = read_line_and_int(pb, &error); // audio bitrate ast->codec->channels = read_line_and_int(pb, &error); // number of audio channels - ast->codec->bits_per_sample = read_line_and_int(pb, &error); // audio bits per sample + ast->codec->bits_per_coded_sample = read_line_and_int(pb, &error); // audio bits per sample // At least one sample uses 0 for ADPCM, which is really 4 bits // per sample. - if (ast->codec->bits_per_sample == 0) - ast->codec->bits_per_sample = 4; + if (ast->codec->bits_per_coded_sample == 0) + ast->codec->bits_per_coded_sample = 4; ast->codec->bit_rate = ast->codec->sample_rate * - ast->codec->bits_per_sample * + ast->codec->bits_per_coded_sample * ast->codec->channels; ast->codec->codec_id = CODEC_ID_NONE; switch (audio_format) { case 1: - if (ast->codec->bits_per_sample == 16) { + if (ast->codec->bits_per_coded_sample == 16) { // 16-bit audio is always signed ast->codec->codec_id = CODEC_ID_PCM_S16LE; break; @@ -206,12 +206,12 @@ // samples needed. break; case 101: - if (ast->codec->bits_per_sample == 8) { + if (ast->codec->bits_per_coded_sample == 8) { // The samples with this kind of audio that I have // are all unsigned. ast->codec->codec_id = CODEC_ID_PCM_U8; break; - } else if (ast->codec->bits_per_sample == 4) { + } else if (ast->codec->bits_per_coded_sample == 4) { ast->codec->codec_id = CODEC_ID_ADPCM_IMA_EA_SEAD; break; }
--- a/segafilm.c Mon Sep 08 00:58:24 2008 +0000 +++ b/segafilm.c Mon Sep 08 14:24:59 2008 +0000 @@ -148,12 +148,12 @@ st->codec->codec_id = film->audio_type; st->codec->codec_tag = 1; st->codec->channels = film->audio_channels; - st->codec->bits_per_sample = film->audio_bits; + st->codec->bits_per_coded_sample = film->audio_bits; st->codec->sample_rate = film->audio_samplerate; st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * - st->codec->bits_per_sample; + st->codec->bits_per_coded_sample; st->codec->block_align = st->codec->channels * - st->codec->bits_per_sample / 8; + st->codec->bits_per_coded_sample / 8; } /* load the sample table */
--- a/sierravmd.c Mon Sep 08 00:58:24 2008 +0000 +++ b/sierravmd.c Mon Sep 08 14:24:59 2008 +0000 @@ -120,13 +120,13 @@ st->codec->sample_rate = vmd->sample_rate; st->codec->block_align = AV_RL16(&vmd->vmd_header[806]); if (st->codec->block_align & 0x8000) { - st->codec->bits_per_sample = 16; + st->codec->bits_per_coded_sample = 16; st->codec->block_align = -(st->codec->block_align - 0x10000); } else { - st->codec->bits_per_sample = 8; + st->codec->bits_per_coded_sample = 8; } st->codec->bit_rate = st->codec->sample_rate * - st->codec->bits_per_sample * st->codec->channels; + st->codec->bits_per_coded_sample * st->codec->channels; /* calculate pts */ num = st->codec->block_align;
--- a/siff.c Mon Sep 08 00:58:24 2008 +0000 +++ b/siff.c Mon Sep 08 14:24:59 2008 +0000 @@ -75,7 +75,7 @@ ast->codec->codec_type = CODEC_TYPE_AUDIO; ast->codec->codec_id = CODEC_ID_PCM_U8; ast->codec->channels = 1; - ast->codec->bits_per_sample = c->bits; + ast->codec->bits_per_coded_sample = c->bits; ast->codec->sample_rate = c->rate; ast->codec->frame_size = c->block_align; av_set_pts_info(ast, 16, 1, c->rate);
--- a/smacker.c Mon Sep 08 00:58:24 2008 +0000 +++ b/smacker.c Mon Sep 08 14:24:59 2008 +0000 @@ -179,11 +179,11 @@ ast[i]->codec->codec_tag = MKTAG('S', 'M', 'K', 'A'); ast[i]->codec->channels = (smk->rates[i] & SMK_AUD_STEREO) ? 2 : 1; ast[i]->codec->sample_rate = smk->rates[i] & 0xFFFFFF; - ast[i]->codec->bits_per_sample = (smk->rates[i] & SMK_AUD_16BITS) ? 16 : 8; - if(ast[i]->codec->bits_per_sample == 16 && ast[i]->codec->codec_id == CODEC_ID_PCM_U8) + ast[i]->codec->bits_per_coded_sample = (smk->rates[i] & SMK_AUD_16BITS) ? 16 : 8; + if(ast[i]->codec->bits_per_coded_sample == 16 && ast[i]->codec->codec_id == CODEC_ID_PCM_U8) ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE; av_set_pts_info(ast[i], 64, 1, ast[i]->codec->sample_rate - * ast[i]->codec->channels * ast[i]->codec->bits_per_sample / 8); + * ast[i]->codec->channels * ast[i]->codec->bits_per_coded_sample / 8); } }
--- a/tiertexseq.c Mon Sep 08 00:58:24 2008 +0000 +++ b/tiertexseq.c Mon Sep 08 14:24:59 2008 +0000 @@ -230,9 +230,9 @@ st->codec->codec_tag = 0; /* no tag */ st->codec->channels = 1; st->codec->sample_rate = SEQ_SAMPLE_RATE; - st->codec->bits_per_sample = 16; - st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_sample * st->codec->channels; - st->codec->block_align = st->codec->channels * st->codec->bits_per_sample; + st->codec->bits_per_coded_sample = 16; + st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_coded_sample * st->codec->channels; + st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample; return 0; }
--- a/tta.c Mon Sep 08 00:58:24 2008 +0000 +++ b/tta.c Mon Sep 08 14:24:59 2008 +0000 @@ -91,7 +91,7 @@ st->codec->codec_id = CODEC_ID_TTA; st->codec->channels = channels; st->codec->sample_rate = samplerate; - st->codec->bits_per_sample = bps; + st->codec->bits_per_coded_sample = bps; st->codec->extradata_size = url_ftell(s->pb); if(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE <= (unsigned)st->codec->extradata_size){
--- a/utils.c Mon Sep 08 00:58:24 2008 +0000 +++ b/utils.c Mon Sep 08 14:24:59 2008 +0000 @@ -2166,7 +2166,7 @@ for(i=0;i<ic->nb_streams;i++) { st = ic->streams[i]; if (st->codec->codec_type == CODEC_TYPE_VIDEO) { - if(st->codec->codec_id == CODEC_ID_RAWVIDEO && !st->codec->codec_tag && !st->codec->bits_per_sample) + if(st->codec->codec_id == CODEC_ID_RAWVIDEO && !st->codec->codec_tag && !st->codec->bits_per_coded_sample) st->codec->codec_tag= avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt); if(duration_count[i] @@ -2198,8 +2198,8 @@ } } }else if(st->codec->codec_type == CODEC_TYPE_AUDIO) { - if(!st->codec->bits_per_sample) - st->codec->bits_per_sample= av_get_bits_per_sample(st->codec->codec_id); + if(!st->codec->bits_per_coded_sample) + st->codec->bits_per_coded_sample= av_get_bits_per_sample(st->codec->codec_id); } }
--- a/vocdec.c Mon Sep 08 00:58:24 2008 +0000 +++ b/vocdec.c Mon Sep 08 14:24:59 2008 +0000 @@ -84,7 +84,7 @@ dec->sample_rate = sample_rate; dec->channels = channels; dec->codec_id = codec_get_id(ff_voc_codec_tags, get_byte(pb)); - dec->bits_per_sample = av_get_bits_per_sample(dec->codec_id); + dec->bits_per_coded_sample = av_get_bits_per_sample(dec->codec_id); voc->remaining_size -= 2; max_size -= 2; channels = 1; @@ -104,7 +104,7 @@ case VOC_TYPE_NEW_VOICE_DATA: dec->sample_rate = get_le32(pb); - dec->bits_per_sample = get_byte(pb); + dec->bits_per_coded_sample = get_byte(pb); dec->channels = get_byte(pb); dec->codec_id = codec_get_id(ff_voc_codec_tags, get_le16(pb)); url_fskip(pb, 4); @@ -120,7 +120,7 @@ } } - dec->bit_rate = dec->sample_rate * dec->bits_per_sample; + dec->bit_rate = dec->sample_rate * dec->bits_per_coded_sample; if (max_size <= 0) max_size = 2048;
--- a/vocenc.c Mon Sep 08 00:58:24 2008 +0000 +++ b/vocenc.c Mon Sep 08 14:24:59 2008 +0000 @@ -55,7 +55,7 @@ put_byte(pb, VOC_TYPE_NEW_VOICE_DATA); put_le24(pb, pkt->size + 12); put_le32(pb, enc->sample_rate); - put_byte(pb, enc->bits_per_sample); + put_byte(pb, enc->bits_per_coded_sample); put_byte(pb, enc->channels); put_le16(pb, enc->codec_tag); put_le32(pb, 0);
--- a/wc3movie.c Mon Sep 08 00:58:24 2008 +0000 +++ b/wc3movie.c Mon Sep 08 14:24:59 2008 +0000 @@ -259,10 +259,10 @@ st->codec->codec_id = CODEC_ID_PCM_S16LE; st->codec->codec_tag = 1; st->codec->channels = WC3_AUDIO_CHANNELS; - st->codec->bits_per_sample = WC3_AUDIO_BITS; + st->codec->bits_per_coded_sample = WC3_AUDIO_BITS; st->codec->sample_rate = WC3_SAMPLE_RATE; st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * - st->codec->bits_per_sample; + st->codec->bits_per_coded_sample; st->codec->block_align = WC3_AUDIO_BITS * WC3_AUDIO_CHANNELS; return 0;
--- a/westwood.c Mon Sep 08 00:58:24 2008 +0000 +++ b/westwood.c Mon Sep 08 14:24:59 2008 +0000 @@ -154,10 +154,10 @@ st->codec->codec_tag = 0; /* no tag */ st->codec->channels = wsaud->audio_channels; st->codec->sample_rate = wsaud->audio_samplerate; - st->codec->bits_per_sample = wsaud->audio_bits; + st->codec->bits_per_coded_sample = wsaud->audio_bits; 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; + st->codec->bits_per_coded_sample / 4; + st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample; wsaud->audio_stream_index = st->index; wsaud->audio_frame_counter = 0; @@ -264,10 +264,10 @@ st->codec->channels = header[26]; if (!st->codec->channels) st->codec->channels = 1; - st->codec->bits_per_sample = 16; + st->codec->bits_per_coded_sample = 16; 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; + st->codec->bits_per_coded_sample / 4; + st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample; wsvqa->audio_stream_index = st->index; wsvqa->audio_samplerate = st->codec->sample_rate;
--- a/wv.c Mon Sep 08 00:58:24 2008 +0000 +++ b/wv.c Mon Sep 08 14:24:59 2008 +0000 @@ -151,7 +151,7 @@ st->codec->codec_id = CODEC_ID_WAVPACK; st->codec->channels = wc->chan; st->codec->sample_rate = wc->rate; - st->codec->bits_per_sample = wc->bpp; + st->codec->bits_per_coded_sample = wc->bpp; av_set_pts_info(st, 64, 1, wc->rate); s->start_time = 0; s->duration = (int64_t)wc->samples * AV_TIME_BASE / st->codec->sample_rate;
--- a/xa.c Mon Sep 08 00:58:24 2008 +0000 +++ b/xa.c Mon Sep 08 14:24:59 2008 +0000 @@ -72,7 +72,7 @@ /* Value in file is average byte rate*/ st->codec->bit_rate = get_le32(pb) * 8; st->codec->block_align = get_le16(pb); - st->codec->bits_per_sample = get_le16(pb); + st->codec->bits_per_coded_sample = get_le16(pb); av_set_pts_info(st, 64, 1, st->codec->sample_rate);