mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 08:17:01 +00:00
h265parse: Fix to check returned value
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3968>
This commit is contained in:
parent
5c47002d99
commit
eab15c8659
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) {
|
||||
gint new_fps_num, new_fps_den;
|
||||
|
||||
gst_util_fraction_multiply (fps_num, fps_den, 1, 2, &new_fps_num,
|
||||
&new_fps_den);
|
||||
if (!gst_util_fraction_multiply (fps_num, fps_den, 1, 2, &new_fps_num,
|
||||
&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_den = new_fps_den;
|
||||
}
|
||||
h265parse->parsed_framerate = FALSE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue