[vlc-commits] packetizer: mpeg4audio: move block check
Francois Cartegnie
git at videolan.org
Wed Feb 22 13:58:09 CET 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Feb 21 17:14:57 2017 +0100| [ff0a8f28ff41d2b19acaefc4776ede04debbbc4e] | committer: Francois Cartegnie
packetizer: mpeg4audio: move block check
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ff0a8f28ff41d2b19acaefc4776ede04debbbc4e
---
modules/packetizer/mpeg4audio.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/modules/packetizer/mpeg4audio.c b/modules/packetizer/mpeg4audio.c
index 0620617..94cb06e 100644
--- a/modules/packetizer/mpeg4audio.c
+++ b/modules/packetizer/mpeg4audio.c
@@ -314,16 +314,19 @@ static block_t *PacketizeRawBlock(decoder_t *p_dec, block_t **pp_block)
if (!pp_block || !*pp_block)
return NULL;
- if ((*pp_block)->i_flags & (BLOCK_FLAG_DISCONTINUITY | BLOCK_FLAG_CORRUPTED)) {
+ p_block = *pp_block;
+ *pp_block = NULL; /* Don't reuse this block */
+
+ if (p_block->i_flags & (BLOCK_FLAG_DISCONTINUITY | BLOCK_FLAG_CORRUPTED))
+ {
FlushRawBlock(p_dec);
- if ((*pp_block)->i_flags&(BLOCK_FLAG_CORRUPTED)) {
- block_Release(*pp_block);
+ if (p_block->i_flags&(BLOCK_FLAG_CORRUPTED))
+ {
+ block_Release(p_block);
return NULL;
}
}
- p_block = *pp_block;
- *pp_block = NULL; /* Don't reuse this block */
if (!date_Get(&p_sys->end_date) && p_block->i_pts <= VLC_TS_INVALID) {
/* We've just started the stream, wait for the first PTS. */
More information about the vlc-commits
mailing list