mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 04:00:37 +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)) {
|
||||
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;
|
||||
}
|
||||
|
||||
gst_video_converter_frame (pad->priv->convert, converted_frame, frame);
|
||||
pad->converted_buffer = converted_buf;
|
||||
gst_video_frame_unmap (frame);
|
||||
g_slice_free (GstVideoFrame, frame);
|
||||
} else {
|
||||
converted_frame = frame;
|
||||
converted_buf = pad->buffer;
|
||||
|
|
Loading…
Reference in a new issue