From 5e1840622ce6e41c57d9c407604863d3f3dcc3ae Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 23 May 2016 09:59:35 +0200 Subject: [PATCH] avconv: fix handling attachments in init_output_stream The current code assumes that encoding_needed is simply an inverse of stream_copy, which is not true for manually attached files (for which neither of those is true). --- avconv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avconv.c b/avconv.c index e5a76b1746..4f8d688895 100644 --- a/avconv.c +++ b/avconv.c @@ -1734,7 +1734,7 @@ static int init_output_stream(OutputStream *ost, char *error, int error_len) } ost->st->time_base = ost->enc_ctx->time_base; - } else { + } else if (ost->stream_copy) { ret = av_opt_set_dict(ost->enc_ctx, &ost->encoder_opts); if (ret < 0) return ret;