videoaggregator: Unmap and free GstVideoFrames as needed after conversion and errors

This commit is contained in:
Sebastian Dröge 2014-10-06 10:11:47 +03:00
parent d2f4d20d85
commit 9e122f6442

View file

@ -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;