summaryrefslogtreecommitdiff
path: root/libavcodec/wmalosslessdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-01 22:06:55 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-01 22:06:55 +0200
commit75f847aa6b1bc88733e59d680809f614977b4c07 (patch)
tree53261bf30de91f2f8c831d51b65e002840415e3d /libavcodec/wmalosslessdec.c
parentaab5a4521c4034c218cbd72325b5d1946a3ec3c2 (diff)
parentf1ffb01ee9fd3a15c395c3cf6ff362ac5cd668d0 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: avplay: use libavresample for sample format conversion and channel mixing Fix compilation with YASM/NASM without AVX support. WMAL: do not output last frame again if nothing was decoded in current packet WMAL: do not start decoding if frame does not end in current packet adpcm-thp: fix invalid array indexing ppc: add const where needed in scalarproduct_int16_altivec() ppc: remove shift parameter from scalarproduct_int16_altivec() ppc: dsputil: do unaligned block accesses correctly dvenc: do not call dsputil functions with stride not a multiple of 16 APIchanges: fill in some dates and commit hashes Conflicts: doc/APIchanges ffplay.c libavcodec/adpcm.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmalosslessdec.c')
-rw-r--r--libavcodec/wmalosslessdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index de5dca333c..f4166d338e 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -1216,8 +1216,8 @@ 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)
- decode_frame(s);
+ 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",
s->num_saved_bits - s->frame_offset);