]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/electronicarts.c
Remove redundant fastmemcpy.h #include, it is indirectly #included by avutil.h.
[ffmpeg] / libavformat / electronicarts.c
index f9fbfef78cbff53f3f0dba1d08a5adce7ae5b124..2b66c739c0b2619eb180bde4ced01a8aeea5edb6 100644 (file)
@@ -1,18 +1,20 @@
 /* Electronic Arts Multimedia File Demuxer
  * Copyright (c) 2004  The ffmpeg Project
  *
- * This library is free software; you can redistribute it and/or
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
  *
- * This library is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -78,7 +80,7 @@ static uint32_t read_arbitary(ByteIOContext *pb) {
 static int process_ea_header(AVFormatContext *s) {
     int inHeader;
     uint32_t blockid, size;
-    EaDemuxContext *ea = (EaDemuxContext *)s->priv_data;
+    EaDemuxContext *ea = s->priv_data;
     ByteIOContext *pb = &s->pb;
 
     if (get_buffer(pb, (void*)&blockid, 4) != 4) {
@@ -163,10 +165,7 @@ static int process_ea_header(AVFormatContext *s) {
 
 static int ea_probe(AVProbeData *p)
 {
-    if (p->buf_size < 4)
-        return 0;
-
-    if (LE_32(&p->buf[0]) != SCHl_TAG)
+    if (AV_RL32(&p->buf[0]) != SCHl_TAG)
         return 0;
 
     return AVPROBE_SCORE_MAX;
@@ -175,7 +174,7 @@ static int ea_probe(AVProbeData *p)
 static int ea_read_header(AVFormatContext *s,
                           AVFormatParameters *ap)
 {
-    EaDemuxContext *ea = (EaDemuxContext *)s->priv_data;
+    EaDemuxContext *ea = s->priv_data;
     AVStream *st;
 
     if (!process_ea_header(s))
@@ -228,8 +227,8 @@ static int ea_read_packet(AVFormatContext *s,
 
         if (get_buffer(pb, preamble, EA_PREAMBLE_SIZE) != EA_PREAMBLE_SIZE)
             return AVERROR_IO;
-        chunk_type = LE_32(&preamble[0]);
-        chunk_size = LE_32(&preamble[4]) - EA_PREAMBLE_SIZE;
+        chunk_type = AV_RL32(&preamble[0]);
+        chunk_size = AV_RL32(&preamble[4]) - EA_PREAMBLE_SIZE;
 
         switch (chunk_type) {
         /* audio data */
@@ -273,7 +272,7 @@ static int ea_read_packet(AVFormatContext *s,
 
 static int ea_read_close(AVFormatContext *s)
 {
-//    EaDemuxContext *ea = (EaDemuxContext *)s->priv_data;
+//    EaDemuxContext *ea = s->priv_data;
 
     return 0;
 }