hls: Avoid coverity warning about access off the end of an array.

Fixes CID 1364755
This commit is contained in:
Jan Schmidt 2016-08-04 22:21:16 +10:00
parent 947656cfd2
commit d78686f7d4

View file

@ -1039,7 +1039,7 @@ gst_m3u8_hls_media_type_get_nick (GstHLSMediaType mtype)
"subtitle", "closed-captions"
};
if (mtype < 0 || mtype > GST_HLS_N_MEDIA_TYPES)
if (mtype < 0 || mtype >= GST_HLS_N_MEDIA_TYPES)
return "invalid";
return nicks[mtype];