mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
avaudenc: log error string as well in debug output
This commit is contained in:
parent
a3d930afbe
commit
5a823a5fbf
1 changed files with 4 additions and 1 deletions
|
@ -381,7 +381,10 @@ gst_ffmpegaudenc_encode_audio (GstFFMpegAudEnc * ffmpegaudenc,
|
||||||
|
|
||||||
res = avcodec_encode_audio2 (ctx, &pkt, &frame, have_data);
|
res = avcodec_encode_audio2 (ctx, &pkt, &frame, have_data);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
GST_ERROR_OBJECT (ffmpegaudenc, "Failed to encode buffer: %d", res);
|
char error_str[128] = { 0, };
|
||||||
|
|
||||||
|
av_strerror (res, error_str, sizeof (error_str));
|
||||||
|
GST_ERROR_OBJECT (enc, "Failed to encode buffer: %d - %s", res, error_str);
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
GST_LOG_OBJECT (ffmpegaudenc, "got output size %d", res);
|
GST_LOG_OBJECT (ffmpegaudenc, "got output size %d", res);
|
||||||
|
|
Loading…
Reference in a new issue