summaryrefslogtreecommitdiffstats
path: root/stream/freesdp
diff options
context:
space:
mode:
authorben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-09 20:30:24 +0000
committerben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-09 20:30:24 +0000
commit571c0fb8a949fe55fb685060f7b5d190f7c42b7f (patch)
treee3276887b943d8650dd36ae626b4c2cc11ee25d2 /stream/freesdp
parent2c64a71a2928bed7b57ab98d6f3130354bab61ae (diff)
downloadmpv-571c0fb8a949fe55fb685060f7b5d190f7c42b7f.tar.bz2
mpv-571c0fb8a949fe55fb685060f7b5d190f7c42b7f.tar.xz
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
Diffstat (limited to 'stream/freesdp')
-rw-r--r--stream/freesdp/parser.c2
1 files changed, 1 insertions, 1 deletions
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];
}