mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
vaapipostproc: fix memory leaks
This commit is contained in:
parent
c181308904
commit
ce03fa8ed0
1 changed files with 9 additions and 3 deletions
|
@ -256,8 +256,10 @@ _fixate_frame_size (GstVaapiPostproc * postproc, GstVideoInfo * vinfo,
|
|||
/* Might have failed but try to keep the DAR nonetheless by
|
||||
* adjusting the PAR */
|
||||
if (!gst_util_fraction_multiply (from_dar_n, from_dar_d, h, set_w,
|
||||
&to_par_n, &to_par_d))
|
||||
&to_par_n, &to_par_d)) {
|
||||
gst_structure_free (tmp);
|
||||
goto overflow_error;
|
||||
}
|
||||
|
||||
if (!gst_structure_has_field (tmp, "pixel-aspect-ratio"))
|
||||
gst_structure_set_value (tmp, "pixel-aspect-ratio", to_par);
|
||||
|
@ -328,8 +330,10 @@ _fixate_frame_size (GstVaapiPostproc * postproc, GstVideoInfo * vinfo,
|
|||
/* Might have failed but try to keep the DAR nonetheless by
|
||||
* adjusting the PAR */
|
||||
if (!gst_util_fraction_multiply (from_dar_n, from_dar_d, set_h, w,
|
||||
&to_par_n, &to_par_d))
|
||||
&to_par_n, &to_par_d)) {
|
||||
gst_structure_free (tmp);
|
||||
goto overflow_error;
|
||||
}
|
||||
|
||||
if (!gst_structure_has_field (tmp, "pixel-aspect-ratio"))
|
||||
gst_structure_set_value (tmp, "pixel-aspect-ratio", to_par);
|
||||
|
@ -439,8 +443,10 @@ _fixate_frame_size (GstVaapiPostproc * postproc, GstVideoInfo * vinfo,
|
|||
gst_structure_get_int (tmp, "width", &set_w);
|
||||
|
||||
if (!gst_util_fraction_multiply (from_dar_n, from_dar_d, set_h, set_w,
|
||||
&to_par_n, &to_par_d))
|
||||
&to_par_n, &to_par_d)) {
|
||||
gst_structure_free (tmp);
|
||||
goto overflow_error;
|
||||
}
|
||||
|
||||
if (!gst_structure_has_field (tmp, "pixel-aspect-ratio"))
|
||||
gst_structure_set_value (tmp, "pixel-aspect-ratio", to_par);
|
||||
|
|
Loading…
Reference in a new issue