diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-05-01 10:43:10 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-05-15 07:42:07 +0200 |
commit | 0c1959b056f6ccaa2eee2c824352ba93c8e36d52 (patch) | |
tree | 4706fca90a0acb580ae1b5cc3dc2e3fdc8dd6a5a /libavformat/mxfenc.c | |
parent | b70d7a4ac72d23f3448f3b08b770fdf5f57de222 (diff) | |
download | ffmpeg-0c1959b056f6ccaa2eee2c824352ba93c8e36d52.tar.gz |
lavf: add AVFMT_FLAG_BITEXACT.
Use it instead of checking CODEC_FLAG_BITEXACT in the first stream's
codec context.
Using codec options inside lavf is fragile and can easily break when the
muxing codec context is not the encoding context.
Diffstat (limited to 'libavformat/mxfenc.c')
-rw-r--r-- | libavformat/mxfenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 4fd5687beb..66beec2940 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -507,7 +507,7 @@ static void mxf_write_identification(AVFormatContext *s) mxf_write_metadata_key(pb, 0x013000); PRINT_KEY(s, "identification key", pb->buf_ptr - 16); - version = s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT ? + version = s->flags & AVFMT_FLAG_BITEXACT ? "0.0.0" : AV_STRINGIFY(LIBAVFORMAT_VERSION); length = 84 + (strlen(company)+strlen(product)+strlen(version))*2; // utf-16 klv_encode_ber_length(pb, length); @@ -1512,7 +1512,7 @@ static int mxf_write_header(AVFormatContext *s) mxf->essence_container_count = 1; } - if (!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT)) + if (!(s->flags & AVFMT_FLAG_BITEXACT)) mxf_gen_umid(s); for (i = 0; i < s->nb_streams; i++) { |