aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-08-25 00:37:04 +0200
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-08-30 23:30:09 +0200
commitc34363acd21c4431a59db41f08dbae637097773a (patch)
treea0724d219778da7829aa4ce6023d3ea53c2b8f14
parente6c20e214efd21cac56309c1548cf5dbdf1edf38 (diff)
downloadffmpeg-c34363acd21c4431a59db41f08dbae637097773a.tar.gz
mux: warn if the encoders bitexact flag is set, but not the muxers
Based-on-patch-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-rw-r--r--libavformat/mux.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 81c467648e..8d5867cdcf 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -250,10 +250,23 @@ 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)) {
#if FF_API_LAVF_BITEXACT
- if (s->nb_streams && s->streams[0]->codec->flags & AV_CODEC_FLAG_BITEXACT)
- s->flags |= AVFMT_FLAG_BITEXACT;
+ av_log(s, AV_LOG_WARNING,
+ "Setting the AVFormatContext to bitexact mode, because "
+ "the AVCodecContext is in that mode. This behavior will "
+ "change in the future. To keep the current behavior, set "
+ "AVFormatContext.flags |= AVFMT_FLAG_BITEXACT.\n");
+ s->flags |= AVFMT_FLAG_BITEXACT;
+#else
+ av_log(s, AV_LOG_WARNING,
+ "The AVFormatContext is not in set to bitexact mode, only "
+ "the AVCodecContext. If this is not intended, set "
+ "AVFormatContext.flags |= AVFMT_FLAG_BITEXACT.\n");
#endif
+ }
+ }
// some sanity checks
if (s->nb_streams == 0 && !(of->flags & AVFMT_NOSTREAMS)) {