From d4640f77fb0768ea0d4044f6e3191850793f8256 Mon Sep 17 00:00:00 2001 From: Will Storey Date: Mon, 23 Jul 2018 17:31:45 -0700 Subject: [PATCH] Use simpler method for retrieving error message --- videostreamer.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/videostreamer.c b/videostreamer.c index 1cef249..8432924 100644 --- a/videostreamer.c +++ b/videostreamer.c @@ -454,10 +454,7 @@ vs_write_packet(const struct VSInput * const input, // Using av_write_frame() skips buffering. const int write_res = av_write_frame(output->format_ctx, pkt); if (write_res != 0) { - char error_buf[256]; - memset(error_buf, 0, 256); - av_strerror(write_res, error_buf, 256); - printf("unable to write frame: %s\n", error_buf); + printf("unable to write frame: %s\n", av_err2str(write_res)); return -1; }