mirror of
https://github.com/mpv-player/mpv
synced 2024-12-28 10:02:17 +00:00
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
This commit is contained in:
parent
2c64a71a29
commit
571c0fb8a9
@ -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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user