[MPlayer-cvslog] r28919 - trunk/stream/freesdp/parser.c

ben subversion at mplayerhq.hu
Mon Mar 9 21:30:25 CET 2009


Author: ben
Date: Mon Mar  9 21:30:24 2009
New Revision: 28919

Log:
The first valid index is total count - 1 (usually 0)

Modified:
   trunk/stream/freesdp/parser.c

Modified: trunk/stream/freesdp/parser.c
==============================================================================
--- trunk/stream/freesdp/parser.c	Mon Mar  9 20:15:20 2009	(r28918)
+++ trunk/stream/freesdp/parser.c	Mon Mar  9 21:30:24 2009	(r28919)
@@ -1644,7 +1644,7 @@ const char *
 fsdp_get_media_format (const fsdp_media_description_t * dsc,
 		       unsigned int index)
 {
-  if (!dsc || (index < dsc->formats_count))
+  if (!dsc || (index < dsc->formats_count - 1))
     return NULL;
   return dsc->formats[index];
 }



More information about the MPlayer-cvslog mailing list