mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 21:18:52 +00:00
videoaggregator: Unmap and free GstVideoFrames as needed after conversion and errors
This commit is contained in:
parent
d2f4d20d85
commit
9e122f6442
1 changed files with 4 additions and 0 deletions
|
@ -1042,12 +1042,16 @@ prepare_frames (GstVideoAggregator * vagg, GstVideoAggregatorPad * pad)
|
||||||
converted_buf, GST_MAP_READWRITE)) {
|
converted_buf, GST_MAP_READWRITE)) {
|
||||||
GST_WARNING_OBJECT (vagg, "Could not map converted frame");
|
GST_WARNING_OBJECT (vagg, "Could not map converted frame");
|
||||||
|
|
||||||
|
g_slice_free (GstVideoFrame, converted_frame);
|
||||||
|
gst_video_frame_unmap (frame);
|
||||||
|
g_slice_free (GstVideoFrame, frame);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_video_converter_frame (pad->priv->convert, converted_frame, frame);
|
gst_video_converter_frame (pad->priv->convert, converted_frame, frame);
|
||||||
pad->converted_buffer = converted_buf;
|
pad->converted_buffer = converted_buf;
|
||||||
gst_video_frame_unmap (frame);
|
gst_video_frame_unmap (frame);
|
||||||
|
g_slice_free (GstVideoFrame, frame);
|
||||||
} else {
|
} else {
|
||||||
converted_frame = frame;
|
converted_frame = frame;
|
||||||
converted_buf = pad->buffer;
|
converted_buf = pad->buffer;
|
||||||
|
|
Loading…
Reference in a new issue