History

avconv: fix a segfault on -c copy with -filter_complex.

Anton Khirnov committed 14 years ago

Commit 8c4022a1 parent 462a5b71 file · +12 −1Browse files

Unified · Split

avconv.c+12−1
@@ -2612,7 +2612,11 @@ static int transcode_init(void) · 2611 unmodified lines
26122612 }
26132613
26142614 if (ost->stream_copy) {
2615− uint64_t extra_size = (uint64_t)icodec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE;
2615+ uint64_t extra_size;
2616+
2617+ av_assert0(ist && !ost->filter);
2618+
2619+ extra_size = (uint64_t)icodec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE;
26162620
26172621 if (extra_size > INT_MAX) {
26182622 return AVERROR(EINVAL);
@@ -4194,6 +4198,13 @@ static void init_output_filter(OutputFilter *ofilter, OptionsContext *o, · 1575 unmodified lines
41944198
41954199 ofilter->ost = ost;
41964200
4201+ if (ost->stream_copy) {
4202+ av_log(NULL, AV_LOG_ERROR, "Streamcopy requested for output stream %d:%d, "
4203+ "which is fed from a complex filtergraph. Filtering and streamcopy "
4204+ "cannot be used together.\n", ost->file_index, ost->index);
4205+ exit_program(1);
4206+ }
4207+
41974208 if (configure_output_filter(ofilter->graph, ofilter, ofilter->out_tmp) < 0) {
41984209 av_log(NULL, AV_LOG_FATAL, "Error configuring filter.\n");
41994210 exit_program(1);

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