Mercurial > mplayer.hg
changeset 28884:304ee75ca7ae
The first valid index is total count - 1 (usually 0)
author | ben |
---|---|
date | Mon, 09 Mar 2009 20:30:24 +0000 |
parents | c3f295ceae51 |
children | e375263bd10b |
files | stream/freesdp/parser.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/freesdp/parser.c Mon Mar 09 19:15:20 2009 +0000 +++ b/stream/freesdp/parser.c Mon Mar 09 20:30:24 2009 +0000 @@ -1644,7 +1644,7 @@ 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]; }