[vlc-commits] avcodec: release block on flushing if we are not using it
Ilkka Ollakka
git at videolan.org
Sun Oct 20 09:39:01 CEST 2013
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Oct 19 20:38:36 2013 +0300| [4c4b954783f6bf236856306193b397c7cb2075cd] | committer: Ilkka Ollakka
avcodec: release block on flushing if we are not using it
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4c4b954783f6bf236856306193b397c7cb2075cd
---
modules/codec/avcodec/encoder.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 89e2813..8d1a790 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -1265,8 +1265,10 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
else
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 );
+ else
+ block_Release( p_block );
} while( got_packet && (i_out>=0) );
return p_chain;
}
More information about the vlc-commits
mailing list