[vlc-devel] [RFC PATCH 2/9] decoder: abort packetizer loop in case of error
Thomas Guillem
thomas at gllm.fr
Sat Jul 9 12:20:10 CEST 2016
If a decoder module set an error, pf_decode shouldn't be called again.
---
src/input/decoder.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 43a05da..cbc68e9 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1025,6 +1025,11 @@ static void DecoderProcessVideo( decoder_t *p_dec, block_t *p_block )
p_packetized_block->p_next = NULL;
DecoderDecodeVideo( p_dec, p_packetized_block );
+ if( p_dec->b_error )
+ {
+ block_ChainRelease( p_next );
+ return;
+ }
p_packetized_block = p_next;
}
@@ -1200,6 +1205,11 @@ static void DecoderProcessAudio( decoder_t *p_dec, block_t *p_block )
p_packetized_block->p_next = NULL;
DecoderDecodeAudio( p_dec, p_packetized_block );
+ if( p_dec->b_error )
+ {
+ block_ChainRelease( p_next );
+ return;
+ }
p_packetized_block = p_next;
}
--
2.8.1
More information about the vlc-devel
mailing list