Commit 4c4b9547 authored by Ilkka Ollakka's avatar Ilkka Ollakka

avcodec: release block on flushing if we are not using it

parent ed69a40c
...@@ -1265,8 +1265,10 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf ) ...@@ -1265,8 +1265,10 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
else else
p_block->i_dts = p_block->i_pts = VLC_TS_INVALID; p_block->i_dts = p_block->i_pts = VLC_TS_INVALID;
if( i_out >= 0 && got_packet ) if( likely(i_out >= 0 && got_packet ))
block_ChainAppend( &p_chain, p_block ); block_ChainAppend( &p_chain, p_block );
else
block_Release( p_block );
} while( got_packet && (i_out>=0) ); } while( got_packet && (i_out>=0) );
return p_chain; return p_chain;
} }
......
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