mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 13:02:29 +00:00
oggstream: remove NULL test after dereference
And add NULLness asserts at top of function. The only call to this passes local variable pointers, so non NULL. Coverity 206375
This commit is contained in:
parent
1b0f13ebf2
commit
2c07c54b8a
1 changed files with 6 additions and 5 deletions
|
@ -1506,6 +1506,9 @@ gst_ogg_map_search_index (GstOggStream * pad, gboolean before,
|
|||
guint64 ts;
|
||||
GstOggIndex *best;
|
||||
|
||||
g_return_val_if_fail (timestamp != NULL, FALSE);
|
||||
g_return_val_if_fail (offset != NULL, FALSE);
|
||||
|
||||
n_index = pad->n_index;
|
||||
if (n_index == 0 || pad->index == NULL)
|
||||
return FALSE;
|
||||
|
@ -1523,11 +1526,9 @@ gst_ogg_map_search_index (GstOggStream * pad, gboolean before,
|
|||
|
||||
GST_INFO ("found at index %u", (guint) (best - pad->index));
|
||||
|
||||
if (offset)
|
||||
*offset = best->offset;
|
||||
if (timestamp)
|
||||
*timestamp =
|
||||
gst_util_uint64_scale (best->timestamp, GST_SECOND, pad->kp_denom);
|
||||
*offset = best->offset;
|
||||
*timestamp =
|
||||
gst_util_uint64_scale (best->timestamp, GST_SECOND, pad->kp_denom);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue