1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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: Kostya Shishkov <kostya.shishkov@gmail.com>
This commit is contained in:
Mashiat Sarker Shakkhar 2012-04-30 08:56:35 -07:00 committed by Kostya Shishkov
parent a812ed003f
commit f92f452378

View File

@ -1209,8 +1209,8 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr,
save_bits(s, gb, num_bits_prev_frame, 1); save_bits(s, gb, num_bits_prev_frame, 1);
/* decode the cross packet frame if it is valid */ /* 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); decode_frame(s);
} else if (s->num_saved_bits - s->frame_offset) { } else if (s->num_saved_bits - s->frame_offset) {
av_dlog(avctx, "ignoring %x previously saved bits\n", av_dlog(avctx, "ignoring %x previously saved bits\n",
s->num_saved_bits - s->frame_offset); s->num_saved_bits - s->frame_offset);