[FFmpeg-devel] [PATCH 1/2] avformat/mux: Warn if the muxers bitexact flag is not set but it looks as if the user wants it set
Michael Niedermayer
michaelni at gmx.at
Sun Aug 23 11:09:53 CEST 2015
From: Michael Niedermayer <michael at niedermayer.cc>
Note: I doubt requiring this in the future is a good idea
See: [FFmpeg-devel] [PATCH 3/4] fate: add -fflags +bitexact to the relevant targets
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavformat/mux.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 81c4676..77a24cc 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -250,10 +250,15 @@ static int init_muxer(AVFormatContext *s, AVDictionary **options)
(ret = av_opt_set_dict2(s->priv_data, &tmp, AV_OPT_SEARCH_CHILDREN)) < 0)
goto fail;
+ if (s->nb_streams && s->streams[0]->codec->flags & AV_CODEC_FLAG_BITEXACT) {
+ if (!(s->flags & AVFMT_FLAG_BITEXACT))
+ av_log(s, AV_LOG_WARNING, "Muxer bitexact flag is not set, please set AVFormatContext.flags |= AVFMT_FLAG_BITEXACT.\n"
+ "This will become mandatory with future API cleanup\n"
+ );
#if FF_API_LAVF_BITEXACT
- if (s->nb_streams && s->streams[0]->codec->flags & AV_CODEC_FLAG_BITEXACT)
s->flags |= AVFMT_FLAG_BITEXACT;
#endif
+ }
// some sanity checks
if (s->nb_streams == 0 && !(of->flags & AVFMT_NOSTREAMS)) {
--
1.7.9.5
More information about the ffmpeg-devel
mailing list