matroskamux: do not use uinitialized clut on error

If we're missing part of the clut, do not try to use it. It seems
very likely the break was meant to break out of the switch rather
than from the loop.

Coverity 1139878
This commit is contained in:
Vincent Penquerc'h 2014-05-02 14:25:01 +01:00
parent d917c94037
commit 590e20cbc9

View file

@ -879,7 +879,7 @@ gst_matroska_mux_handle_sink_event (GstCollectPads * pads,
if (!gst_structure_get_int (structure, name, &value)) {
GST_ERROR_OBJECT (mux, "dvd-spu-clut-change event did not "
"contain %s field", name);
break;
goto break_hard;
}
clut[i] = value;
}
@ -893,6 +893,7 @@ gst_matroska_mux_handle_sink_event (GstCollectPads * pads,
break;
}
break_hard:
if (event != NULL)
return gst_collect_pads_event_default (pads, data, event, FALSE);