Mercurial > mplayer.hg
diff stream/freesdp/parser.c @ 28884:304ee75ca7ae
The first valid index is total count - 1 (usually 0)
| author | ben |
|---|---|
| date | Mon, 09 Mar 2009 20:30:24 +0000 |
| parents | 0c7a9144e5f0 |
| children | 0f1b5b68af32 |
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]; }
