Merge commit '1e340af8d6a97cc013a2ad8ba77c77129625a34f'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 23 Jun 2013 10:45:15 +0000 (12:45 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 23 Jun 2013 10:56:05 +0000 (12:56 +0200)
* commit '1e340af8d6a97cc013a2ad8ba77c77129625a34f':
  avconv: drop additional strerror fallback

Merged-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index e199a10ef463f43cce21757b44769aae24f16f1a..8ed4dafc4454a6336d922ce14fd61cbcb1aa817a 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2486,10 +2486,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;
         }