diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c index 8a3d91f41d..4081378265 100644 --- a/doc/examples/filtering_audio.c +++ b/doc/examples/filtering_audio.c @@ -254,9 +254,7 @@ end: av_frame_free(&filt_frame); if (ret < 0 && ret != AVERROR_EOF) { - char buf[1024]; - av_strerror(ret, buf, sizeof(buf)); - fprintf(stderr, "Error occurred: %s\n", buf); + fprintf(stderr, "Error occurred: %s\n", av_err2str(ret)); exit(1); } diff --git a/doc/examples/filtering_video.c b/doc/examples/filtering_video.c index 9c9881468d..c93332085f 100644 --- a/doc/examples/filtering_video.c +++ b/doc/examples/filtering_video.c @@ -243,9 +243,7 @@ end: av_frame_free(&filt_frame); if (ret < 0 && ret != AVERROR_EOF) { - char buf[1024]; - av_strerror(ret, buf, sizeof(buf)); - fprintf(stderr, "Error occurred: %s\n", buf); + fprintf(stderr, "Error occurred: %s\n", av_err2str(ret)); exit(1); }