summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Stachowski <qbast@go2.pl>2012-04-21 12:37:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-21 19:05:16 +0200
commit93bf1aac6ab9874769d347bc9fdd14cb18f063f6 (patch)
treeb055cd8649cef396a8af30134f951bee3b8e7587
parentb27383e45333db60ae4c412ccf609daeba008e2e (diff)
wmalossless: Ensure that last frame is not written again if nothing was decoded in current packet.
Reviewed-by: Mashiat Sarker Shakkhar <mashiat.sarker@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/wmalosslessdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 021ce496ff..de5dca333c 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -1171,6 +1171,8 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr,
int buf_size = avpkt->size;
int num_bits_prev_frame, packet_sequence_number, spliced_packet;
+ s->frame.nb_samples = 0;
+
if (s->packet_done || s->packet_loss) {
s->packet_done = 0;