Skip to content

Commit 0c84b97

Browse files
committed
avdevice/jack: use av_err2str to simplify code
No need to explicitly specify the buffer here as it is only ever passed to av_log, so av_err2str can be used.
1 parent 5dfc547 commit 0c84b97

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

libavdevice/jack.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,9 @@ static int audio_read_packet(AVFormatContext *context, AVPacket *pkt)
291291
av_log(context, AV_LOG_ERROR,
292292
"Input error: timed out when waiting for JACK process callback output\n");
293293
} else {
294-
char errbuf[128];
295294
int ret = AVERROR(errno);
296-
av_strerror(ret, errbuf, sizeof(errbuf));
297295
av_log(context, AV_LOG_ERROR, "Error while waiting for audio packet: %s\n",
298-
errbuf);
296+
av_err2str(ret));
299297
}
300298
if (!self->client)
301299
av_log(context, AV_LOG_ERROR, "Input error: JACK server is gone\n");

0 commit comments

Comments
 (0)