From 06111f4d32c4dbfbc1186f1a75aa9352a5b037da Mon Sep 17 00:00:00 2001 From: Juergen Keil Date: Sat, 12 Oct 2002 17:14:41 +0000 Subject: Use the audio_fifo - whenever it's possible - to send the demuxed audio data. CVS patchset: 2816 CVS date: 2002/10/12 17:14:41 --- src/demuxers/demux_avi.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index 091c8614d..b4ccec6ae 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_avi.c,v 1.112 2002/10/12 17:11:58 jkeil Exp $ + * $Id: demux_avi.c,v 1.113 2002/10/12 17:14:41 jkeil Exp $ * * demultiplexer for avi streams * @@ -1046,7 +1046,15 @@ static int demux_avi_next (demux_avi_t *this) { get_audio_pts (this, i, audio->audio_posc, aie->tot, audio->audio_posb); if (!this->no_audio && (audio_pts < video_pts)) { - buf = this->video_fifo->buffer_pool_alloc (this->video_fifo); + if (this->audio_fifo) { + buf = this->audio_fifo->buffer_pool_alloc (this->audio_fifo); + } else { + /* + * no audio: + * borrow a buffer from video fifo, it get immediately freed below + */ + buf = this->video_fifo->buffer_pool_alloc (this->video_fifo); + } /* read audio */ -- cgit v1.2.3