From 37c0c434250c6ad1ad2d76f383179af23610d6a2 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 24 Oct 2005 17:40:37 +0000 Subject: [PATCH] ext/vorbis/vorbisdec.c: Correctly flush decoder samples even if we could not copy them to an output buffer. Fixes #31... Original commit message from CVS: * ext/vorbis/vorbisdec.c: (vorbis_handle_data_packet): Correctly flush decoder samples even if we could not copy them to an output buffer. Fixes #319618. --- ChangeLog | 6 ++++++ ext/vorbis/vorbisdec.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d8277771b0..3f6d86325a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-10-24 Wim Taymans + + * ext/vorbis/vorbisdec.c: (vorbis_handle_data_packet): + Correctly flush decoder samples even if we could not + copy them to an output buffer. Fixes #319618. + 2005-10-24 Julien MOUTTE * sys/ximage/ximagesink.c: (gst_ximagesink_setcaps): diff --git a/ext/vorbis/vorbisdec.c b/ext/vorbis/vorbisdec.c index 73c0ecb415..c6f934b3df 100644 --- a/ext/vorbis/vorbisdec.c +++ b/ext/vorbis/vorbisdec.c @@ -810,11 +810,11 @@ vorbis_handle_data_packet (GstVorbisDec * vd, ogg_packet * packet) if (vd->granulepos != -1) vd->granulepos += sample_count; - vorbis_synthesis_read (&vd->vd, sample_count); - result = vorbis_dec_push (vd, out); done: + vorbis_synthesis_read (&vd->vd, sample_count); + /* granulepos is the last sample in the packet */ if (packet->granulepos != -1) vd->granulepos = packet->granulepos;