aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-05 07:24:16 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-03-05 19:00:22 +0100
commitc99bd29462e1735ff85980e57ee57e55d1cc6745 (patch)
treea6e1fa63dd7d054737eef42878e998eb5d06a2fb
parent456d65a5c6a9013adabbe0f21c920a6f04b9e6e9 (diff)
downloadffmpeg-c99bd29462e1735ff85980e57ee57e55d1cc6745.tar.gz
Revert "wmaenc: check final frame size against output packet size"
This condition cannot happen, if it can it is a bug that MUST be fixed. And i very happily volunteer to fix it if someone reports a case to me that fails. This reverts commit 5d652e063bd3a180f9de8915e5137aa4f938846d.
-rw-r--r--libavcodec/wmaenc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c
index 29baa10230..c15df65ba8 100644
--- a/libavcodec/wmaenc.c
+++ b/libavcodec/wmaenc.c
@@ -396,13 +396,11 @@ static int encode_superframe(AVCodecContext *avctx,
}
#endif
- if ((i = encode_frame(s, s->coefs, buf, buf_size, total_gain)) >= 0) {
- av_log(avctx, AV_LOG_ERROR, "required frame size too large. please "
- "use a higher bit rate.\n");
- return AVERROR(EINVAL);
- }
+ encode_frame(s, s->coefs, buf, buf_size, total_gain);
assert((put_bits_count(&s->pb) & 7) == 0);
- while (i++)
+ i= s->block_align - (put_bits_count(&s->pb)+7)/8;
+ assert(i>=0);
+ while(i--)
put_bits(&s->pb, 8, 'N');
flush_put_bits(&s->pb);