aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-18 22:00:00 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-18 22:00:00 +0200
commitbbee02ed9c186c1bb1fc0c3bcf79e78af978ae6a (patch)
tree0a212cea8d72ab493df855149ec29631514e859c /ffmpeg.c
parent1e49439f04f4aeb45344e8753094d00ac4b1a5d6 (diff)
downloadffmpeg-bbee02ed9c186c1bb1fc0c3bcf79e78af978ae6a.tar.gz
ffmpeg: Skip writing the version when -flags bitexact is used
Alternatively every fate test could be changed to pass both fflags and flags +bitexact Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 16226069f7..407f47ceb3 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2370,6 +2370,7 @@ static void set_encoder_id(OutputFile *of, OutputStream *ost)
uint8_t *encoder_string;
int encoder_string_len;
int format_flags = 0;
+ int codec_flags = 0;
e = av_dict_get(of->opts, "fflags", NULL, 0);
if (e) {
@@ -2378,13 +2379,20 @@ static void set_encoder_id(OutputFile *of, OutputStream *ost)
return;
av_opt_eval_flags(of->ctx, o, e->value, &format_flags);
}
+ e = av_dict_get(ost->encoder_opts, "flags", NULL, 0);
+ if (e) {
+ const AVOption *o = av_opt_find(ost->st->codec, "flags", NULL, 0, 0);
+ if (!o)
+ return;
+ av_opt_eval_flags(ost->st->codec, o, e->value, &codec_flags);
+ }
encoder_string_len = sizeof(LIBAVCODEC_IDENT) + strlen(ost->enc->name) + 2;
encoder_string = av_mallocz(encoder_string_len);
if (!encoder_string)
exit_program(1);
- if (!(format_flags & AVFMT_FLAG_BITEXACT))
+ if (!(format_flags & AVFMT_FLAG_BITEXACT) && !(codec_flags & CODEC_FLAG_BITEXACT))
av_strlcpy(encoder_string, LIBAVCODEC_IDENT " ", encoder_string_len);
av_strlcat(encoder_string, ost->enc->name, encoder_string_len);
av_dict_set(&ost->st->metadata, "encoder", encoder_string,