Commit 720773f5 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

transcode: audio: Fix potential user after free

parent 28adaf71
...@@ -354,11 +354,14 @@ end: ...@@ -354,11 +354,14 @@ end:
/* Drain encoder */ /* Drain encoder */
if( unlikely( !b_error && in == NULL ) ) if( unlikely( !b_error && in == NULL ) )
{ {
block_t *p_block; if( id->p_encoder->p_module )
do { {
p_block = id->p_encoder->pf_encode_audio(id->p_encoder, NULL ); block_t *p_block;
block_ChainAppend( out, p_block ); do {
} while( p_block ); p_block = id->p_encoder->pf_encode_audio(id->p_encoder, NULL );
block_ChainAppend( out, p_block );
} while( p_block );
}
} }
return b_error ? VLC_EGENERIC : VLC_SUCCESS; return b_error ? VLC_EGENERIC : VLC_SUCCESS;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment