[FFmpeg-cvslog] avconv: drop additional strerror fallback

Luca Barbato git at videolan.org
Sun Jun 23 12:56:48 CEST 2013


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Fri Jun 21 12:47:01 2013 +0200| [1e340af8d6a97cc013a2ad8ba77c77129625a34f] | committer: Luca Barbato

avconv: drop additional strerror fallback

strerror_r is called by av_strerror already.

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

 avconv.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/avconv.c b/avconv.c
index 4808235..b490d4a 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1757,10 +1757,11 @@ static int transcode_init(void)
         oc->interrupt_callback = int_cb;
         if ((ret = avformat_write_header(oc, &output_files[i]->opts)) < 0) {
             char errbuf[128];
-            const char *errbuf_ptr = errbuf;
-            if (av_strerror(ret, errbuf, sizeof(errbuf)) < 0)
-                errbuf_ptr = strerror(AVUNERROR(ret));
-            snprintf(error, sizeof(error), "Could not write header for output file #%d (incorrect codec parameters ?): %s", i, errbuf_ptr);
+            av_strerror(ret, errbuf, sizeof(errbuf));
+            snprintf(error, sizeof(error),
+                     "Could not write header for output file #%d "
+                     "(incorrect codec parameters ?): %s",
+                     i, errbuf);
             ret = AVERROR(EINVAL);
             goto dump_format;
         }



More information about the ffmpeg-cvslog mailing list