aboutsummaryrefslogtreecommitdiffstats
path: root/avconv.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-04-21 07:03:06 +0200
committerAnton Khirnov <anton@khirnov.net>2012-04-24 06:30:02 +0200
commit8c4022aceb68558df655059cef4d570625dc1d09 (patch)
tree5b1cb92a5fa9ff51da1c4564312c6cae270efab9 /avconv.c
parent462a5b783981984421fb71b54d927ac4e6bab524 (diff)
downloadffmpeg-8c4022aceb68558df655059cef4d570625dc1d09.tar.gz
avconv: fix a segfault on -c copy with -filter_complex.
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/avconv.c b/avconv.c
index e441fff855..6c3a01f6b6 100644
--- a/avconv.c
+++ b/avconv.c
@@ -2612,7 +2612,11 @@ static int transcode_init(void)
}
if (ost->stream_copy) {
- uint64_t extra_size = (uint64_t)icodec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE;
+ uint64_t extra_size;
+
+ av_assert0(ist && !ost->filter);
+
+ extra_size = (uint64_t)icodec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE;
if (extra_size > INT_MAX) {
return AVERROR(EINVAL);
@@ -4194,6 +4198,13 @@ static void init_output_filter(OutputFilter *ofilter, OptionsContext *o,
ofilter->ost = ost;
+ if (ost->stream_copy) {
+ av_log(NULL, AV_LOG_ERROR, "Streamcopy requested for output stream %d:%d, "
+ "which is fed from a complex filtergraph. Filtering and streamcopy "
+ "cannot be used together.\n", ost->file_index, ost->index);
+ exit_program(1);
+ }
+
if (configure_output_filter(ofilter->graph, ofilter, ofilter->out_tmp) < 0) {
av_log(NULL, AV_LOG_FATAL, "Error configuring filter.\n");
exit_program(1);