[FFmpeg-cvslog] doc/examples/filtering: make use of av_err2str()

Stefano Sabatini git at videolan.org
Mon Dec 2 14:36:22 CET 2013


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Mon Dec  2 13:08:00 2013 +0100| [82e74ee6e486c5ed956316413c985a9a27c001f8] | committer: Stefano Sabatini

doc/examples/filtering: make use of av_err2str()

Simplify.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=82e74ee6e486c5ed956316413c985a9a27c001f8
---

 doc/examples/filtering_audio.c |    4 +---
 doc/examples/filtering_video.c |    4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c
index 8a3d91f..4081378 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 9c98814..c933320 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);
     }
 



More information about the ffmpeg-cvslog mailing list