diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-14 16:32:56 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-14 16:33:42 +0200 |
commit | 64bd7f8e4db1742e86c5ed02bd530688b74063e3 (patch) | |
tree | ba00aeefa76c959e2e960ea778233e16f4284f12 | |
parent | b3a43515827f3d22a881c33b87384f01c86786fd (diff) | |
download | ffmpeg-64bd7f8e4db1742e86c5ed02bd530688b74063e3.tar.gz |
wmalosslessdec: Reset put bit buffer when num_saved_bits is reset.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/wmalosslessdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index 3b68cca489..bac064ff3d 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -1224,6 +1224,7 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, /* Reset number of saved bits so that the decoder does not start * to decode incomplete frames in the s->len_prefix == 0 case. */ s->num_saved_bits = 0; + init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE); s->packet_loss = 0; } @@ -1273,6 +1274,7 @@ static void flush(AVCodecContext *avctx) s->packet_loss = 1; s->packet_done = 0; s->num_saved_bits = 0; + init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE); s->frame_offset = 0; s->next_packet_start = 0; s->cdlms[0][0].order = 0; |