summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-20 00:50:27 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-20 00:51:47 +0200
commitb2a8bc3d048280c3fc664250af953821a8784c00 (patch)
treed150ee2fe48717957d754e1fe6876d09334add97 /ffmpeg.c
parent6218831844fa5a517eda857adee7960aa0a9c033 (diff)
ffmpeg/set_encoder_id: dont allocate encoder string if one is already set
Fixes memleak Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 7ec5889fae..eafcf0ff48 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2377,6 +2377,9 @@ static void set_encoder_id(OutputFile *of, OutputStream *ost)
int format_flags = 0;
int codec_flags = 0;
+ if (av_dict_get(ost->st->metadata, "encoder", NULL, 0))
+ return;
+
e = av_dict_get(of->opts, "fflags", NULL, 0);
if (e) {
const AVOption *o = av_opt_find(of->ctx, "fflags", NULL, 0, 0);