summaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-26 22:37:37 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-26 22:37:37 +0200
commit53ce9905134e042516ddd7a4476dc668c0b094c4 (patch)
tree05e80abb4ef8b78c7c93bc920b32fb34ac268cc7 /ffmpeg.c
parenta48b890392aa22033f182421ba9e3f3b3256461d (diff)
parent154486f9adc621e620dacd76d78c30a02cc1dcd3 (diff)
downloadffmpeg-streaming-53ce9905134e042516ddd7a4476dc668c0b094c4.zip
ffmpeg-streaming-53ce9905134e042516ddd7a4476dc668c0b094c4.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: opt: Add av_opt_set_bin() avconv: Display the error returned by avformat_write_header rtpenc_chain: Return an error code instead of just a plain pointer rtpenc_chain: Free the URLContext on failure rtpenc: Expose the ssrc as an avoption avprobe: display the codec profile in show_stream() avprobe: fix function prototype cosmetics: Fix indentation avprobe: changelog entry avprobe: update documentation avprobe: provide JSON output avprobe: output proper INI format avprobe: improve formatting rtmp: fix url parsing fate: document TARGET_EXEC and its usage Conflicts: doc/APIchanges doc/fate.texi doc/ffprobe.texi ffprobe.c libavformat/version.h libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index fad21c0..d8396dc 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3294,8 +3294,12 @@ static int transcode_init(void)
for (i = 0; i < nb_output_files; i++) {
oc = output_files[i]->ctx;
oc->interrupt_callback = int_cb;
- if (avformat_write_header(oc, &output_files[i]->opts) < 0) {
- snprintf(error, sizeof(error), "Could not write header for output file #%d (incorrect codec parameters ?)", i);
+ 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);
ret = AVERROR(EINVAL);
goto dump_format;
}
OpenPOWER on IntegriCloud