[NUT-devel] [nut]: r180 - trunk/nututils/framer_mpeg4.c

ods15 subversion at mplayerhq.hu
Sat Nov 4 14:34:09 CET 2006


Author: ods15
Date: Sat Nov  4 14:34:09 2006
New Revision: 180

Modified:
   trunk/nututils/framer_mpeg4.c

Log:
don't crash on empty frames...


Modified: trunk/nututils/framer_mpeg4.c
==============================================================================
--- trunk/nututils/framer_mpeg4.c	(original)
+++ trunk/nututils/framer_mpeg4.c	Sat Nov  4 14:34:09 2006
@@ -9,7 +9,7 @@
 };
 
 static int find_frame_type(int len, uint8_t * buf, int * type) {
-	//if (!len) { *type = 1; return 0; }
+	if (!len) return err_mpeg4_no_frame_type;
 	while (--len) { // not including last byte
 		if (*buf++ != 0xB6) continue;
 		*type = *buf >> 6;



More information about the NUT-devel mailing list