History

avconv: Display the error returned by avformat_write_header

Martin Storsjö committed 14 years ago

Commit a1a6cdc1 parent 68c81301 file · +6 −2Browse files

Unified · Split

avconv.c+6−2
@@ -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 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t