aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/electronicarts.c
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2007-10-18 23:21:31 +0000
committerAurelien Jacobs <aurel@gnuage.org>2007-10-18 23:21:31 +0000
commit78168450640ed471f2da2afaa5d4f4a514642508 (patch)
tree2609091a0fa85f112c0c60fc633df63b26ae504f /libavformat/electronicarts.c
parent6c867e04636d90fa77f06127b8a3a9b718bc61ae (diff)
downloadffmpeg-78168450640ed471f2da2afaa5d4f4a514642508.tar.gz
simplify
Originally committed as revision 10800 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/electronicarts.c')
-rw-r--r--libavformat/electronicarts.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 925e8cee42..1678d689c3 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -36,7 +36,6 @@
#define MV0F_TAG MKTAG('M', 'V', '0', 'F')
#define EA_BITS_PER_SAMPLE 16
-#define EA_PREAMBLE_SIZE 8
typedef struct EaDemuxContext {
int big_endian;
@@ -286,16 +285,12 @@ static int ea_read_packet(AVFormatContext *s,
ByteIOContext *pb = &s->pb;
int ret = 0;
int packet_read = 0;
- unsigned char preamble[EA_PREAMBLE_SIZE];
unsigned int chunk_type, chunk_size;
int key = 0;
while (!packet_read) {
-
- if (get_buffer(pb, preamble, EA_PREAMBLE_SIZE) != EA_PREAMBLE_SIZE)
- return AVERROR(EIO);
- chunk_type = AV_RL32(&preamble[0]);
- chunk_size = AV_RL32(&preamble[4]) - EA_PREAMBLE_SIZE;
+ chunk_type = get_le32(pb);
+ chunk_size = get_le32(pb) - 8;
switch (chunk_type) {
/* audio data */