mirror of
https://github.com/horgh/videostreamer.git
synced 2025-09-26 20:41:31 +08:00
Use simpler method for retrieving error message
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user