Commit f92f4523 authored by Mashiat Sarker Shakkhar's avatar Mashiat Sarker Shakkhar Committed by Kostya Shishkov

WMAL: do not start decoding if frame does not end in current packet

This fixes decoding of frames which span more than two packets. Tested with
recit24.wma.
Signed-off-by: 's avatarKostya Shishkov <kostya.shishkov@gmail.com>
parent a812ed00
......@@ -1209,7 +1209,7 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr,
save_bits(s, gb, num_bits_prev_frame, 1);
/* decode the cross packet frame if it is valid */
if (!s->packet_loss)
if (num_bits_prev_frame < remaining_packet_bits && !s->packet_loss)
decode_frame(s);
} else if (s->num_saved_bits - s->frame_offset) {
av_dlog(avctx, "ignoring %x previously saved bits\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment