diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 17eb318aad..9ced57a9cf 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1064,7 +1064,7 @@ static int mkv_write_attachments(AVFormatContext *s) return AVERROR(EINVAL); } - if (st->codec->flags & CODEC_FLAG_BITEXACT) { + if (s->flags & AVFMT_FLAG_BITEXACT) { struct AVSHA *sha = av_sha_alloc(); uint8_t digest[20]; if (!sha)