diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index 97867823d9..456b555aa7 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -528,6 +528,9 @@ static uint64_t subframe_count_exact(FlacEncodeContext *s, FlacSubframe *sub, /* subframe header */ count += 8; + if (sub->wasted) + count += sub->wasted; + /* subframe */ if (sub->type == FLAC_SUBFRAME_CONSTANT) { count += sub->obits;