mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
videotimecode: Add some more guards for function parameters
This commit is contained in:
parent
c02d3b03c2
commit
df14532b0f
1 changed files with 4 additions and 0 deletions
|
@ -137,6 +137,8 @@ gst_video_time_code_to_string (const GstVideoTimeCode * tc)
|
|||
gboolean top_dot_present;
|
||||
gchar sep;
|
||||
|
||||
g_return_val_if_fail (gst_video_time_code_is_valid (tc), NULL);
|
||||
|
||||
/* Top dot is present for non-interlaced content, and for field 2 in
|
||||
* interlaced content */
|
||||
top_dot_present =
|
||||
|
@ -540,6 +542,8 @@ gst_video_time_code_compare (const GstVideoTimeCode * tc1,
|
|||
{
|
||||
g_return_val_if_fail (gst_video_time_code_is_valid (tc1), -1);
|
||||
g_return_val_if_fail (gst_video_time_code_is_valid (tc2), -1);
|
||||
g_return_val_if_fail (tc1->config.fps_n != 0, -1);
|
||||
g_return_val_if_fail (tc2->config.fps_n != 0, -1);
|
||||
|
||||
if (tc1->config.latest_daily_jam == NULL
|
||||
|| tc2->config.latest_daily_jam == NULL) {
|
||||
|
|
Loading…
Reference in a new issue