Unified · Split
| @@ -2863,8 +2863,12 @@ static int transcode_init(void) · 2862 unmodified lines | |||
| 2863 | for (i = 0; i < nb_output_files; i++) { | 2863 | for (i = 0; i < nb_output_files; i++) { |
| 2864 | oc = output_files[i]->ctx; | 2864 | oc = output_files[i]->ctx; |
| 2865 | oc->interrupt_callback = int_cb; | 2865 | oc->interrupt_callback = int_cb; |
| 2866 | if (avformat_write_header(oc, &output_files[i]->opts) < 0) { | 2866 | if ((ret = avformat_write_header(oc, &output_files[i]->opts)) < 0) { |
| 2867 | snprintf(error, sizeof(error), "Could not write header for output file #%d (incorrect codec parameters ?)", i); | 2867 | char errbuf[128]; |
| 2868 | const char *errbuf_ptr = errbuf; | ||
| 2869 | if (av_strerror(ret, errbuf, sizeof(errbuf)) < 0) | ||
| 2870 | errbuf_ptr = strerror(AVUNERROR(ret)); | ||
| 2871 | snprintf(error, sizeof(error), "Could not write header for output file #%d (incorrect codec parameters ?): %s", i, errbuf_ptr); | ||
| 2868 | ret = AVERROR(EINVAL); | 2872 | ret = AVERROR(EINVAL); |
| 2869 | goto dump_format; | 2873 | goto dump_format; |
| 2870 | } | 2874 | } |