gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r6071 - Extractor/src/plugins


From: gnunet
Subject: [GNUnet-SVN] r6071 - Extractor/src/plugins
Date: Mon, 31 Dec 2007 07:52:33 -0700 (MST)

Author: holindho
Date: 2007-12-31 07:52:32 -0700 (Mon, 31 Dec 2007)
New Revision: 6071

Modified:
   Extractor/src/plugins/flvextractor.c
Log:
less stupid codecid check


Modified: Extractor/src/plugins/flvextractor.c
===================================================================
--- Extractor/src/plugins/flvextractor.c        2007-12-31 13:24:42 UTC (rev 
6070)
+++ Extractor/src/plugins/flvextractor.c        2007-12-31 14:52:32 UTC (rev 
6071)
@@ -721,16 +721,12 @@
         state->streamInfo->audioDataRate = n;
         break;
       case FLV_VCODECID:
-        if (state->streamInfo->videoCodec == -1) {
+        if (state->streamInfo->videoCodec == -1)
           state->streamInfo->videoCodec = n;
-          state->streamInfo->videoCodec &= 0x07; /* prevent index overflows */
-        }
         break;
       case FLV_ACODECID:
-        if (state->streamInfo->audioCodec == -1) {
+        if (state->streamInfo->audioCodec == -1)
           state->streamInfo->audioCodec = n;
-          state->streamInfo->audioCodec &= 0x07; /* prevent index overflows */
-        }
         break;
     }
   }
@@ -859,7 +855,6 @@
   soundSize = (*data & 0x02) >> 1;
   soundRate = (*data & 0x0C) >> 2;
   soundFormat = (*data & 0xF0) >> 4;
-  soundFormat &= 0x07;  /* prevent index overflow */
 
   stinfo->audioCodec = soundFormat;
   stinfo->audioRate = soundRate;
@@ -900,7 +895,6 @@
 
   codecId = *data & 0x0F;
   frameType = (*data & 0xF0) >> 4;
-  codecId &= 0x07; /* prevent index overflow */
   data++;
 
   /* try to get video dimensions */
@@ -1038,8 +1032,8 @@
       n += snprintf(s+n, len-n, "%0.2f fps", stinfo->videoFrameRate);
   }
 
-  if (stinfo->videoCodec != -1 && FLVVideoCodecs[stinfo->videoCodec] != NULL &&
-      n < len) {
+  if (stinfo->videoCodec > -1 && stinfo->videoCodec < 8 &&
+      FLVVideoCodecs[stinfo->videoCodec] != NULL && n < len) {
     if (n > 0)
       n += snprintf(s+n, len-n, ", ");
     if (n < len)
@@ -1085,8 +1079,8 @@
                     FLVAudioChannels[stinfo->audioChannels]);
   }
 
-  if (stinfo->audioCodec != -1 && FLVAudioCodecs[stinfo->audioCodec] != NULL &&
-      n < len) {
+  if (stinfo->audioCodec > -1 && stinfo->audioCodec < 8 &&
+      FLVAudioCodecs[stinfo->audioCodec] != NULL && n < len) {
     if (n > 0)
       n += snprintf(s+n, len-n, ", ");
     if (n < len)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]