mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 20:20:38 +00:00
h265parse: Fix to check returned value
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4352>
This commit is contained in:
parent
8dc62faae1
commit
43e4f3a727
1 changed files with 10 additions and 4 deletions
|
@ -2170,10 +2170,16 @@ gst_h265_parse_update_src_caps (GstH265Parse * h265parse, GstCaps * caps)
|
||||||
&& h265parse->parsed_framerate) {
|
&& h265parse->parsed_framerate) {
|
||||||
gint new_fps_num, new_fps_den;
|
gint new_fps_num, new_fps_den;
|
||||||
|
|
||||||
gst_util_fraction_multiply (fps_num, fps_den, 1, 2, &new_fps_num,
|
if (!gst_util_fraction_multiply (fps_num, fps_den, 1, 2, &new_fps_num,
|
||||||
&new_fps_den);
|
&new_fps_den)) {
|
||||||
|
GST_WARNING_OBJECT (h265parse, "Error calculating the new framerate"
|
||||||
|
" - integer overflow; setting it to 0/1");
|
||||||
|
fps_num = 0;
|
||||||
|
fps_den = 1;
|
||||||
|
} else {
|
||||||
fps_num = new_fps_num;
|
fps_num = new_fps_num;
|
||||||
fps_den = new_fps_den;
|
fps_den = new_fps_den;
|
||||||
|
}
|
||||||
h265parse->parsed_framerate = FALSE;
|
h265parse->parsed_framerate = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue