diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2007-10-18 22:39:27 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2007-10-18 22:39:27 +0000 |
commit | 97e5dcc0f3415e1d44452bd87991a11a58252951 (patch) | |
tree | 3b3aee70a383d38baa461dd1764e54d24d9ac9a7 /libavformat/electronicarts.c | |
parent | 2c82386df26decb4c322e64e0beb6657f55946bc (diff) | |
download | ffmpeg-97e5dcc0f3415e1d44452bd87991a11a58252951.tar.gz |
add support for big_endian encoded headers
Originally committed as revision 10795 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/electronicarts.c')
-rw-r--r-- | libavformat/electronicarts.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index b41f8d51ed..63920198bf 100644 --- a/libavformat/electronicarts.c +++ b/libavformat/electronicarts.c @@ -40,6 +40,8 @@ #define EA_PREAMBLE_SIZE 8 typedef struct EaDemuxContext { + int big_endian; + int video_codec; AVRational time_base; int video_stream_index; @@ -170,6 +172,10 @@ static int process_ea_header(AVFormatContext *s) { blockid = get_le32(pb); size = get_le32(pb); + if (i == 0) + ea->big_endian = size > 0x000FFFFF; + if (ea->big_endian) + size = bswap_32(size); switch (blockid) { case SCHl_TAG : |