Revision 895ab748

View differences:

libavformat/smacker.c
172 172
    /* handle possible audio streams */
173 173
    for(i = 0; i < 7; i++) {
174 174
        smk->indexes[i] = -1;
175
        if((smk->rates[i] & 0xFFFFFF) && !(smk->rates[i] & SMK_AUD_BINKAUD)){
175
        if(smk->rates[i] & 0xFFFFFF){
176 176
            ast[i] = av_new_stream(s, 0);
177 177
            smk->indexes[i] = ast[i]->index;
178 178
            ast[i]->codec->codec_type = CODEC_TYPE_AUDIO;
179
            ast[i]->codec->codec_id = (smk->rates[i] & SMK_AUD_PACKED) ? CODEC_ID_SMACKAUDIO : CODEC_ID_PCM_U8;
180
            ast[i]->codec->codec_tag = MKTAG('S', 'M', 'K', 'A');
179
            if (smk->rates[i] & SMK_AUD_BINKAUD) {
180
                ast[i]->codec->codec_id = CODEC_ID_BINKAUDIO_RDFT;
181
            } else if (smk->rates[i] & SMK_AUD_USEDCT) {
182
                ast[i]->codec->codec_id = CODEC_ID_BINKAUDIO_DCT;
183
            } else if (smk->rates[i] & SMK_AUD_PACKED){
184
                ast[i]->codec->codec_id = CODEC_ID_SMACKAUDIO;
185
                ast[i]->codec->codec_tag = MKTAG('S', 'M', 'K', 'A');
186
            } else {
187
                ast[i]->codec->codec_id = CODEC_ID_PCM_U8;
188
            }
181 189
            ast[i]->codec->channels = (smk->rates[i] & SMK_AUD_STEREO) ? 2 : 1;
182 190
            ast[i]->codec->sample_rate = smk->rates[i] & 0xFFFFFF;
183 191
            ast[i]->codec->bits_per_coded_sample = (smk->rates[i] & SMK_AUD_16BITS) ? 16 : 8;

Also available in: Unified diff