diff options
author | Sascha Sommer <[email protected]> | 2011-09-24 20:56:41 +0200 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2011-09-27 03:05:45 +0200 |
commit | 42c8fdb943b210b2f79e2510a91ca0f542c9bad0 (patch) | |
tree | 09f489d6efc5b6c54677cdbe69a01dda47c2ca3e | |
parent | 1450d6e6377df00a538ae7542981a0ebff9415da (diff) |
Fix segfault in save_bits:
use put_bits_count to get the buffer fill state instead of
num_saved_bits as num_saved_bits is sometimes reset when
frames are lost
(Ticket 495)
(cherry picked from commit 780d45473c32fa356c8ce385c3ea4692567c3228)
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 4f6187c7356111540024901932294e9807061dd0)
-rw-r--r-- | libavcodec/wmaprodec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c index e1d942dca2..b0b98f1d98 100644 --- a/libavcodec/wmaprodec.c +++ b/libavcodec/wmaprodec.c @@ -1436,7 +1436,7 @@ static void save_bits(WMAProDecodeCtx *s, GetBitContext* gb, int len, init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE); } - buflen = (s->num_saved_bits + len + 8) >> 3; + buflen = (put_bits_count(&s->pb) + len + 8) >> 3; if (len <= 0 || buflen > MAX_FRAMESIZE) { av_log_ask_for_sample(s->avctx, "input buffer too small\n"); |