[FFmpeg-devel] [PATCH 1/2] Flush remaining frames from last packets
Jakub Stachowski
qbast at go2.pl
Wed May 2 19:59:03 CEST 2012
---
libavcodec/wmalosslessdec.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index de5dca3..c1e5480 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -1173,7 +1173,10 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr,
s->frame.nb_samples = 0;
- if (s->packet_done || s->packet_loss) {
+ if ( !buf && s->num_saved_bits > get_bits_count(&s->gb)) {
+ s->packet_done = 0;
+ if (!decode_frame(s)) s->num_saved_bits = 0;
+ } else if (s->packet_done || s->packet_loss) {
s->packet_done = 0;
/* sanity check for the buffer length */
--
1.7.7
More information about the ffmpeg-devel
mailing list