int inHeader = 1;
EaDemuxContext *ea = s->priv_data;
ByteIOContext *pb = s->pb;
- int compression_type = -1, revision = -1;
+ int compression_type = -1, revision = -1, revision2 = -1;
ea->bytes = 2;
ea->sample_rate = -1;
av_log (s, AV_LOG_INFO, "exited audio subheader\n");
inSubheader = 0;
break;
+ case 0xA0:
+ revision2 = read_arbitary(pb);
+ av_log (s, AV_LOG_INFO, "revision2 (element 0xA0) set to 0x%08x\n", revision2);
+ break;
case 0xFF:
av_log (s, AV_LOG_INFO, "end of header block reached (within audio subheader)\n");
inSubheader = 0;
case 1: ea->audio_codec = CODEC_ID_ADPCM_EA_R1; break;
case 2: ea->audio_codec = CODEC_ID_ADPCM_EA_R2; break;
case 3: ea->audio_codec = CODEC_ID_ADPCM_EA_R3; break;
+ case -1: break;
default:
av_log(s, AV_LOG_ERROR, "unsupported stream type; revision=%i\n", revision);
return 0;
}
+ switch (revision2) {
+ case 8: ea->audio_codec = CODEC_ID_PCM_S16LE_PLANAR; break;
+ default:
+ av_log(s, AV_LOG_ERROR, "unsupported stream type; revision2=%i\n", revision2);
+ return 0;
+ }
break;
default:
av_log(s, AV_LOG_ERROR, "unsupported stream type; compression_type=%i\n", compression_type);
if (!ea->audio_codec) {
url_fskip(pb, chunk_size);
break;
+ } else if (ea->audio_codec == CODEC_ID_PCM_S16LE_PLANAR) {
+ url_fskip(pb, 12); /* planar header */
+ chunk_size -= 12;
}
ret = av_get_packet(pb, pkt, chunk_size);
if (ret != chunk_size)