changeset 5173:948db02fab55 libavformat

Add condition to aea demuxer probe.
author banan
date Sun, 13 Sep 2009 18:27:53 +0000
parents 06b0c8fd923f
children 664c0b8ae082
files aea.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/aea.c	Sun Sep 13 11:08:59 2009 +0000
+++ b/aea.c	Sun Sep 13 18:27:53 2009 +0000
@@ -37,12 +37,15 @@
 
     /* 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