]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/aea.c
Add forgotten minor bump and changelog entry for the SAP muxer
[ffmpeg] / libavformat / aea.c
index d2c1a1d23844a405fc9085a5c87e4225913b93df..2c4f471b206c1254a0c494f9992d4cb88d9108a6 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-/**
- * @file libavformat/aea.c
- */
-
 #include "avformat.h"
-#include "raw.h"
+#include "pcm.h"
 #include "libavutil/intreadwrite.h"
 
 #define AT1_SU_SIZE     212
@@ -37,20 +33,22 @@ static int aea_read_probe(AVProbeData *p)
 
     /* Magic is '00 08 00 00' in Little Endian*/
     if (AV_RL32(p->buf)==0x800) {
-        int bsm_s, bsm_e, inb_s, inb_e;
+        int bsm_s, bsm_e, inb_s, inb_e, ch;
+        ch    = p->buf[264];
         bsm_s = p->buf[2048];
         inb_s = p->buf[2048+1];
         inb_e = p->buf[2048+210];
         bsm_e = p->buf[2048+211];
 
+        if (ch != 1 && ch != 2)
+            return 0;
 
         /* Check so that the redundant bsm bytes and info bytes are valid
          * the block size mode bytes have to be the same
          * the info bytes have to be the same
-         * the block size mode and info byte can't be the same
          */
-        if (bsm_s == bsm_e && inb_s == inb_e && bsm_s != inb_s)
-            return AVPROBE_SCORE_MAX / 2;
+        if (bsm_s == bsm_e && inb_s == inb_e)
+            return AVPROBE_SCORE_MAX / 4 + 1;
     }
     return 0;
 }
@@ -68,7 +66,7 @@ static int aea_read_header(AVFormatContext *s,
     url_fskip(s->pb, 1783);
 
 
-    st->codec->codec_type     = CODEC_TYPE_AUDIO;
+    st->codec->codec_type     = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id       = CODEC_ID_ATRAC1;
     st->codec->sample_rate    = 44100;
     st->codec->bit_rate       = 292000;