mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
faac: fix some input and output buffer map and ref handling
This commit is contained in:
parent
8bbefbe9cf
commit
9f136a667d
1 changed files with 4 additions and 3 deletions
|
@ -672,7 +672,8 @@ gst_faac_handle_frame (GstAudioEncoder * enc, GstBuffer * in_buf)
|
|||
size / (info->finfo->width / 8), out_data, out_size)) < 0))
|
||||
goto encode_failed;
|
||||
|
||||
gst_buffer_unmap (in_buf, data, size);
|
||||
if (in_buf)
|
||||
gst_buffer_unmap (in_buf, data, -1);
|
||||
|
||||
GST_LOG_OBJECT (faac, "encoder return: %" G_GSIZE_FORMAT, ret_size);
|
||||
|
||||
|
@ -696,9 +697,9 @@ gst_faac_handle_frame (GstAudioEncoder * enc, GstBuffer * in_buf)
|
|||
/* ERRORS */
|
||||
encode_failed:
|
||||
{
|
||||
gst_buffer_unref (out_buf);
|
||||
GST_ELEMENT_ERROR (faac, LIBRARY, ENCODE, (NULL), (NULL));
|
||||
gst_buffer_unmap (in_buf, data, size);
|
||||
if (in_buf)
|
||||
gst_buffer_unmap (in_buf, data, -1);
|
||||
gst_buffer_unmap (out_buf, out_data, 0);
|
||||
gst_buffer_unref (out_buf);
|
||||
return GST_FLOW_ERROR;
|
||||
|
|
Loading…
Reference in a new issue