From 0c1959b056f6ccaa2eee2c824352ba93c8e36d52 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 1 May 2014 10:43:10 +0200 Subject: 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. --- libavformat/matroskaenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/matroskaenc.c') diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index d2e3ae4979..c71b32d411 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -970,7 +970,7 @@ static int mkv_write_header(AVFormatContext *s) put_ebml_uint(pb, MATROSKA_ID_TIMECODESCALE, 1000000); if ((tag = av_dict_get(s->metadata, "title", NULL, 0))) put_ebml_string(pb, MATROSKA_ID_TITLE, tag->value); - if (!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT)) { + if (!(s->flags & AVFMT_FLAG_BITEXACT)) { uint32_t segment_uid[4]; AVLFG lfg; -- cgit v1.2.3