Use simpler method for retrieving error message

This commit is contained in:
Will Storey
2018-07-23 17:31:45 -07:00
parent 3673c3ce0b
commit d4640f77fb

View File

@@ -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;
}