mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
faac: fix faac API error checking
Coverity 1139790
This commit is contained in:
parent
2e940ba253
commit
aa2b8f179e
1 changed files with 3 additions and 1 deletions
|
@ -633,6 +633,7 @@ gst_faac_handle_frame (GstAudioEncoder * enc, GstBuffer * in_buf)
|
|||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
GstBuffer *out_buf;
|
||||
gsize size, ret_size;
|
||||
int enc_ret;
|
||||
GstMapInfo map, omap;
|
||||
guint8 *data;
|
||||
GstAudioInfo *info =
|
||||
|
@ -657,9 +658,10 @@ gst_faac_handle_frame (GstAudioEncoder * enc, GstBuffer * in_buf)
|
|||
size = 0;
|
||||
}
|
||||
|
||||
if (G_UNLIKELY ((ret_size = faacEncEncode (faac->handle, (gint32 *) data,
|
||||
if (G_UNLIKELY ((enc_ret = faacEncEncode (faac->handle, (gint32 *) data,
|
||||
size / (info->finfo->width / 8), omap.data, omap.size)) < 0))
|
||||
goto encode_failed;
|
||||
ret_size = enc_ret;
|
||||
|
||||
if (in_buf)
|
||||
gst_buffer_unmap (in_buf, &map);
|
||||
|
|
Loading…
Reference in a new issue