forked from FFmpeg/FFmpeg
simplify
Originally committed as revision 10800 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
6c867e0463
commit
7816845064
1 changed files with 2 additions and 7 deletions
|
@ -36,7 +36,6 @@
|
||||||
#define MV0F_TAG MKTAG('M', 'V', '0', 'F')
|
#define MV0F_TAG MKTAG('M', 'V', '0', 'F')
|
||||||
|
|
||||||
#define EA_BITS_PER_SAMPLE 16
|
#define EA_BITS_PER_SAMPLE 16
|
||||||
#define EA_PREAMBLE_SIZE 8
|
|
||||||
|
|
||||||
typedef struct EaDemuxContext {
|
typedef struct EaDemuxContext {
|
||||||
int big_endian;
|
int big_endian;
|
||||||
|
@ -286,16 +285,12 @@ static int ea_read_packet(AVFormatContext *s,
|
||||||
ByteIOContext *pb = &s->pb;
|
ByteIOContext *pb = &s->pb;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int packet_read = 0;
|
int packet_read = 0;
|
||||||
unsigned char preamble[EA_PREAMBLE_SIZE];
|
|
||||||
unsigned int chunk_type, chunk_size;
|
unsigned int chunk_type, chunk_size;
|
||||||
int key = 0;
|
int key = 0;
|
||||||
|
|
||||||
while (!packet_read) {
|
while (!packet_read) {
|
||||||
|
chunk_type = get_le32(pb);
|
||||||
if (get_buffer(pb, preamble, EA_PREAMBLE_SIZE) != EA_PREAMBLE_SIZE)
|
chunk_size = get_le32(pb) - 8;
|
||||||
return AVERROR(EIO);
|
|
||||||
chunk_type = AV_RL32(&preamble[0]);
|
|
||||||
chunk_size = AV_RL32(&preamble[4]) - EA_PREAMBLE_SIZE;
|
|
||||||
|
|
||||||
switch (chunk_type) {
|
switch (chunk_type) {
|
||||||
/* audio data */
|
/* audio data */
|
||||||
|
|
Loading…
Add table
Reference in a new issue