mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
mxfdemux: guard against NULL non source components
This component is dereferenced, and later code checking for NULL in particular cases implies it can be NULL. This likely does not fix the coverity warning as it was seeing another path setting component to NULL explicitely, but this was spotted by looking at: Coverity 1139736 Which is actually OK from what I can see since the actual dereference of the explicit NULL pointer will not happen if the condition that led to the NULL pointer assignment is met, since the assignment and defeference have mutually exclusive tests.
This commit is contained in:
parent
9815faea9b
commit
52981d5a4a
1 changed files with 9 additions and 0 deletions
|
@ -1009,6 +1009,15 @@ gst_mxf_demux_update_tracks (GstMXFDemux * demux)
|
|||
component =
|
||||
MXF_METADATA_SOURCE_CLIP (sequence->structural_components
|
||||
[component_index]);
|
||||
if (!component) {
|
||||
GST_WARNING_OBJECT (demux, "NULL conponent in non source package");
|
||||
if (!pad) {
|
||||
continue;
|
||||
} else {
|
||||
ret = GST_FLOW_ERROR;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
if (component->source_package && component->source_package->top_level &&
|
||||
MXF_METADATA_GENERIC_PACKAGE (component->source_package)->tracks) {
|
||||
|
|
Loading…
Reference in a new issue