[libav-commits] avconv: fix handling attachments in init_output_stream

Anton Khirnov git at libav.org
Tue Jun 21 12:39:39 CEST 2016


Module: libav
Branch: master
Commit: 5e1840622ce6e41c57d9c407604863d3f3dcc3ae

Author:    Anton Khirnov <anton at khirnov.net>
Committer: Anton Khirnov <anton at khirnov.net>
Date:      Mon May 23 09:59:35 2016 +0200

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 e5a76b1..4f8d688 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;



More information about the libav-commits mailing list