GitLab will be down for maintenance this Sunday 13th June, from approx 7-11am UTC. This is for a PostgreSQL migration. See the tracker issue for more informations.

Commit da1182f1 authored by Vincent Penquerc'h's avatar Vincent Penquerc'h Committed by Sebastian Dröge
Browse files

jpeg2000sampling: fix critical when sampling is missing from caps

This can happen with real files
parent 5282d12a
...@@ -46,7 +46,8 @@ GstJPEG2000Sampling ...@@ -46,7 +46,8 @@ GstJPEG2000Sampling
gst_jpeg2000_sampling_from_string (const gchar * sampling_string) gst_jpeg2000_sampling_from_string (const gchar * sampling_string)
{ {
GstJPEG2000Sampling i; GstJPEG2000Sampling i;
g_return_val_if_fail (sampling_string != NULL, GST_JPEG2000_SAMPLING_NONE); if (sampling_string == NULL)
for (i = 0; i < G_N_ELEMENTS (gst_jpeg2000_sampling_strings); ++i) { for (i = 0; i < G_N_ELEMENTS (gst_jpeg2000_sampling_strings); ++i) {
if (!g_strcmp0 (sampling_string, gst_jpeg2000_sampling_strings[i])) if (!g_strcmp0 (sampling_string, gst_jpeg2000_sampling_strings[i]))
return (i + 1); return (i + 1);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment