mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-08 13:38:07 +00:00
Merge commit '4908c8ef2706d98022bf27a5c5bca1fe109e7529'
* commit '4908c8ef2706d98022bf27a5c5bca1fe109e7529': electronicarts: Improve some function/variable names Conflicts: libavformat/electronicarts.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
4195321a82
@ -78,7 +78,7 @@ typedef struct EaDemuxContext {
|
|||||||
int num_samples;
|
int num_samples;
|
||||||
} EaDemuxContext;
|
} EaDemuxContext;
|
||||||
|
|
||||||
static uint32_t read_arbitary(AVIOContext *pb)
|
static uint32_t read_arbitrary(AVIOContext *pb)
|
||||||
{
|
{
|
||||||
uint8_t size, byte;
|
uint8_t size, byte;
|
||||||
int i;
|
int i;
|
||||||
@ -100,52 +100,52 @@ static int process_audio_header_elements(AVFormatContext *s)
|
|||||||
{
|
{
|
||||||
EaDemuxContext *ea = s->priv_data;
|
EaDemuxContext *ea = s->priv_data;
|
||||||
AVIOContext *pb = s->pb;
|
AVIOContext *pb = s->pb;
|
||||||
int inHeader = 1;
|
int in_header = 1;
|
||||||
int compression_type = -1, revision = -1, revision2 = -1;
|
int compression_type = -1, revision = -1, revision2 = -1;
|
||||||
|
|
||||||
ea->bytes = 2;
|
ea->bytes = 2;
|
||||||
ea->sample_rate = -1;
|
ea->sample_rate = -1;
|
||||||
ea->num_channels = 1;
|
ea->num_channels = 1;
|
||||||
|
|
||||||
while (!url_feof(pb) && inHeader) {
|
while (!url_feof(pb) && in_header) {
|
||||||
int inSubheader;
|
int in_subheader;
|
||||||
uint8_t byte;
|
uint8_t byte;
|
||||||
byte = avio_r8(pb);
|
byte = avio_r8(pb);
|
||||||
|
|
||||||
switch (byte) {
|
switch (byte) {
|
||||||
case 0xFD:
|
case 0xFD:
|
||||||
av_log(s, AV_LOG_DEBUG, "entered audio subheader\n");
|
av_log(s, AV_LOG_DEBUG, "entered audio subheader\n");
|
||||||
inSubheader = 1;
|
in_subheader = 1;
|
||||||
while (!url_feof(pb) && inSubheader) {
|
while (!url_feof(pb) && in_subheader) {
|
||||||
uint8_t subbyte;
|
uint8_t subbyte;
|
||||||
subbyte = avio_r8(pb);
|
subbyte = avio_r8(pb);
|
||||||
|
|
||||||
switch (subbyte) {
|
switch (subbyte) {
|
||||||
case 0x80:
|
case 0x80:
|
||||||
revision = read_arbitary(pb);
|
revision = read_arbitrary(pb);
|
||||||
av_log(s, AV_LOG_DEBUG,
|
av_log(s, AV_LOG_DEBUG,
|
||||||
"revision (element 0x80) set to 0x%08x\n", revision);
|
"revision (element 0x80) set to 0x%08x\n", revision);
|
||||||
break;
|
break;
|
||||||
case 0x82:
|
case 0x82:
|
||||||
ea->num_channels = read_arbitary(pb);
|
ea->num_channels = read_arbitrary(pb);
|
||||||
av_log(s, AV_LOG_DEBUG,
|
av_log(s, AV_LOG_DEBUG,
|
||||||
"num_channels (element 0x82) set to 0x%08x\n",
|
"num_channels (element 0x82) set to 0x%08x\n",
|
||||||
ea->num_channels);
|
ea->num_channels);
|
||||||
break;
|
break;
|
||||||
case 0x83:
|
case 0x83:
|
||||||
compression_type = read_arbitary(pb);
|
compression_type = read_arbitrary(pb);
|
||||||
av_log(s, AV_LOG_DEBUG,
|
av_log(s, AV_LOG_DEBUG,
|
||||||
"compression_type (element 0x83) set to 0x%08x\n",
|
"compression_type (element 0x83) set to 0x%08x\n",
|
||||||
compression_type);
|
compression_type);
|
||||||
break;
|
break;
|
||||||
case 0x84:
|
case 0x84:
|
||||||
ea->sample_rate = read_arbitary(pb);
|
ea->sample_rate = read_arbitrary(pb);
|
||||||
av_log(s, AV_LOG_DEBUG,
|
av_log(s, AV_LOG_DEBUG,
|
||||||
"sample_rate (element 0x84) set to %i\n",
|
"sample_rate (element 0x84) set to %i\n",
|
||||||
ea->sample_rate);
|
ea->sample_rate);
|
||||||
break;
|
break;
|
||||||
case 0x85:
|
case 0x85:
|
||||||
ea->num_samples = read_arbitary(pb);
|
ea->num_samples = read_arbitrary(pb);
|
||||||
av_log(s, AV_LOG_DEBUG,
|
av_log(s, AV_LOG_DEBUG,
|
||||||
"num_samples (element 0x85) set to 0x%08x\n",
|
"num_samples (element 0x85) set to 0x%08x\n",
|
||||||
ea->num_samples);
|
ea->num_samples);
|
||||||
@ -153,12 +153,12 @@ static int process_audio_header_elements(AVFormatContext *s)
|
|||||||
case 0x8A:
|
case 0x8A:
|
||||||
av_log(s, AV_LOG_DEBUG,
|
av_log(s, AV_LOG_DEBUG,
|
||||||
"element 0x%02x set to 0x%08x\n",
|
"element 0x%02x set to 0x%08x\n",
|
||||||
subbyte, read_arbitary(pb));
|
subbyte, read_arbitrary(pb));
|
||||||
av_log(s, AV_LOG_DEBUG, "exited audio subheader\n");
|
av_log(s, AV_LOG_DEBUG, "exited audio subheader\n");
|
||||||
inSubheader = 0;
|
in_subheader = 0;
|
||||||
break;
|
break;
|
||||||
case 0xA0:
|
case 0xA0:
|
||||||
revision2 = read_arbitary(pb);
|
revision2 = read_arbitrary(pb);
|
||||||
av_log(s, AV_LOG_DEBUG,
|
av_log(s, AV_LOG_DEBUG,
|
||||||
"revision2 (element 0xA0) set to 0x%08x\n",
|
"revision2 (element 0xA0) set to 0x%08x\n",
|
||||||
revision2);
|
revision2);
|
||||||
@ -166,25 +166,25 @@ static int process_audio_header_elements(AVFormatContext *s)
|
|||||||
case 0xFF:
|
case 0xFF:
|
||||||
av_log(s, AV_LOG_DEBUG,
|
av_log(s, AV_LOG_DEBUG,
|
||||||
"end of header block reached (within audio subheader)\n");
|
"end of header block reached (within audio subheader)\n");
|
||||||
inSubheader = 0;
|
in_subheader = 0;
|
||||||
inHeader = 0;
|
in_header = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
av_log(s, AV_LOG_DEBUG,
|
av_log(s, AV_LOG_DEBUG,
|
||||||
"element 0x%02x set to 0x%08x\n",
|
"element 0x%02x set to 0x%08x\n",
|
||||||
subbyte, read_arbitary(pb));
|
subbyte, read_arbitrary(pb));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0xFF:
|
case 0xFF:
|
||||||
av_log(s, AV_LOG_DEBUG, "end of header block reached\n");
|
av_log(s, AV_LOG_DEBUG, "end of header block reached\n");
|
||||||
inHeader = 0;
|
in_header = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
av_log(s, AV_LOG_DEBUG,
|
av_log(s, AV_LOG_DEBUG,
|
||||||
"header element 0x%02x set to 0x%08x\n",
|
"header element 0x%02x set to 0x%08x\n",
|
||||||
byte, read_arbitary(pb));
|
byte, read_arbitrary(pb));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user