mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 21:35:44 +00:00
mxf: Handle fraction parsing failure
And properly cleanup/reset the segment before returning on errors CID #206012
This commit is contained in:
parent
fa72b4c870
commit
be859d02a6
1 changed files with 3 additions and 1 deletions
|
@ -1254,7 +1254,8 @@ mxf_index_table_segment_parse (const MXFUL * ul,
|
|||
|
||||
entry->pos_table = g_new0 (MXFFraction, segment->pos_table_count);
|
||||
for (j = 0; j < segment->pos_table_count; j++) {
|
||||
mxf_fraction_parse (&entry->pos_table[j], tag_data, tag_size);
|
||||
if (!mxf_fraction_parse (&entry->pos_table[j], tag_data, tag_size))
|
||||
goto error;
|
||||
tag_data += 8;
|
||||
tag_size -= 8;
|
||||
GST_DEBUG (" pos table %u = %d/%d", j, entry->pos_table[j].n,
|
||||
|
@ -1281,6 +1282,7 @@ mxf_index_table_segment_parse (const MXFUL * ul,
|
|||
|
||||
error:
|
||||
GST_ERROR ("Invalid index table segment");
|
||||
mxf_index_table_segment_reset (segment);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue