[vlc-commits] transcode: audio: fix dequeing on error
Francois Cartegnie
git at videolan.org
Mon Jul 9 16:15:35 CEST 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jun 27 18:04:56 2018 +0200| [72422d34de299e49e0c38a9a5cc95e88646d2929] | committer: Francois Cartegnie
transcode: audio: fix dequeing on error
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=72422d34de299e49e0c38a9a5cc95e88646d2929
---
modules/stream_out/transcode/audio.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/modules/stream_out/transcode/audio.c b/modules/stream_out/transcode/audio.c
index 958dcd2204..fb0e1c09b9 100644
--- a/modules/stream_out/transcode/audio.c
+++ b/modules/stream_out/transcode/audio.c
@@ -372,13 +372,13 @@ int transcode_audio_process( sout_stream_t *p_stream,
return VLC_EGENERIC;
block_t *p_audio_bufs = transcode_dequeue_all_audios( id );
- if( p_audio_bufs == NULL )
- goto end;
do
{
block_t *p_audio_buf = p_audio_bufs;
- p_audio_bufs = p_audio_bufs->p_next;
+ if( p_audio_buf == NULL )
+ break;
+ p_audio_bufs = p_audio_buf->p_next;
p_audio_buf->p_next = NULL;
if( id->b_error )
@@ -470,7 +470,6 @@ error:
id->b_error = true;
} while( p_audio_bufs );
-end:
/* Drain encoder */
if( unlikely( !id->b_error && in == NULL ) && id->p_encoder->p_module )
{
More information about the vlc-commits
mailing list