summaryrefslogtreecommitdiff
path: root/avconv.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-05-23 07:38:58 +0200
committerAnton Khirnov <anton@khirnov.net>2016-06-21 12:39:02 +0200
commit90944ee3ab79081845ea1bd97eea475031ce0842 (patch)
tree7354d0691939fd2a3f0a038cda3bdda081ad3b4a /avconv.c
parent5e1840622ce6e41c57d9c407604863d3f3dcc3ae (diff)
avconv: refactor selecting an encoder
Fail immediately if automatic encoder selection failed. Always set the stream_copy/encoding_needed flags in one place.
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/avconv.c b/avconv.c
index 4f8d688895..6470837d59 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1949,17 +1949,6 @@ static int transcode_init(void)
AVCodecContext *enc_ctx = ost->enc_ctx;
AVCodecContext *dec_ctx = NULL;
- if (!ost->enc) {
- /* should only happen when a default codec is not present. */
- snprintf(error, sizeof(error), "Automatic encoder selection "
- "failed for output stream #%d:%d. Default encoder for "
- "format %s is probably disabled. Please choose an "
- "encoder manually.\n", ost->file_index, ost->index,
- oc->oformat->name);
- ret = AVERROR(EINVAL);
- goto dump_format;
- }
-
set_encoder_id(output_files[ost->file_index], ost);
if (ist) {