[FFmpeg-cvslog] r19697 - in trunk/libavformat: mpegts.c mpegts.h

mru subversion
Mon Aug 24 23:42:25 CEST 2009


Author: mru
Date: Mon Aug 24 23:42:25 2009
New Revision: 19697

Log:
mpegts: change variable-length array to fixed length

The difference between 188 and 204 is not worth worrying about.

Modified:
   trunk/libavformat/mpegts.c
   trunk/libavformat/mpegts.h

Modified: trunk/libavformat/mpegts.c
==============================================================================
--- trunk/libavformat/mpegts.c	Mon Aug 24 23:42:22 2009	(r19696)
+++ trunk/libavformat/mpegts.c	Mon Aug 24 23:42:25 2009	(r19697)
@@ -356,7 +356,7 @@ static void mpegts_close_filter(MpegTSCo
 }
 
 static int analyze(const uint8_t *buf, int size, int packet_size, int *index){
-    int stat[packet_size];
+    int stat[TS_MAX_PACKET_SIZE];
     int i;
     int x=0;
     int best_score=0;

Modified: trunk/libavformat/mpegts.h
==============================================================================
--- trunk/libavformat/mpegts.h	Mon Aug 24 23:42:22 2009	(r19696)
+++ trunk/libavformat/mpegts.h	Mon Aug 24 23:42:25 2009	(r19697)
@@ -27,6 +27,8 @@
 #define TS_FEC_PACKET_SIZE 204
 #define TS_DVHS_PACKET_SIZE 192
 #define TS_PACKET_SIZE 188
+#define TS_MAX_PACKET_SIZE 204
+
 #define NB_PID_MAX 8192
 #define MAX_SECTION_SIZE 4096
 



More information about the ffmpeg-cvslog mailing list