From 571c0fb8a949fe55fb685060f7b5d190f7c42b7f Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 9 Mar 2009 20:30:24 +0000 Subject: The first valid index is total count - 1 (usually 0) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28919 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/freesdp/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream/freesdp/parser.c b/stream/freesdp/parser.c index c17041b7ba..bf6f985e94 100644 --- a/stream/freesdp/parser.c +++ b/stream/freesdp/parser.c @@ -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]; } -- cgit v1.2.3