mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +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;
|
GstFlowReturn ret = GST_FLOW_OK;
|
||||||
GstBuffer *out_buf;
|
GstBuffer *out_buf;
|
||||||
gsize size, ret_size;
|
gsize size, ret_size;
|
||||||
|
int enc_ret;
|
||||||
GstMapInfo map, omap;
|
GstMapInfo map, omap;
|
||||||
guint8 *data;
|
guint8 *data;
|
||||||
GstAudioInfo *info =
|
GstAudioInfo *info =
|
||||||
|
@ -657,9 +658,10 @@ gst_faac_handle_frame (GstAudioEncoder * enc, GstBuffer * in_buf)
|
||||||
size = 0;
|
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))
|
size / (info->finfo->width / 8), omap.data, omap.size)) < 0))
|
||||||
goto encode_failed;
|
goto encode_failed;
|
||||||
|
ret_size = enc_ret;
|
||||||
|
|
||||||
if (in_buf)
|
if (in_buf)
|
||||||
gst_buffer_unmap (in_buf, &map);
|
gst_buffer_unmap (in_buf, &map);
|
||||||
|
|
Loading…
Reference in a new issue