From 5e36cb2c1485830cf152c05767301a6732b08297 Mon Sep 17 00:00:00 2001 From: Ilkka Ollakka Date: Fri, 18 Sep 2015 15:45:33 +0300 Subject: [PATCH] codec: don't drop discontinue blocks Signed-off-by: Jean-Paul Saman --- modules/codec/a52.c | 6 +++++- modules/codec/avcodec/audio.c | 7 ++++++- modules/codec/avcodec/subtitle.c | 4 +++- modules/codec/bpg.c | 2 +- modules/codec/cdg.c | 2 +- modules/codec/crystalhd.c | 2 +- modules/codec/daala.c | 2 +- modules/codec/ddummy.c | 2 +- modules/codec/dts.c | 11 +++++------ modules/codec/faad.c | 2 +- modules/codec/flac.c | 2 +- modules/codec/gstdecode.c | 7 +++++-- modules/codec/jpeg.c | 2 +- modules/codec/kate.c | 9 ++++++--- modules/codec/libass.c | 2 +- modules/codec/libmpeg2.c | 2 +- modules/codec/mft.c | 5 ++--- modules/codec/mpeg_audio.c | 17 ++++++++--------- modules/codec/mpg123.c | 2 +- modules/codec/png.c | 2 +- modules/codec/scte27.c | 2 +- modules/codec/sdl_image.c | 2 +- modules/codec/stl.c | 2 +- modules/codec/subsdec.c | 2 +- modules/codec/substx3g.c | 2 +- modules/codec/svcdsub.c | 2 +- modules/codec/svg.c | 2 +- modules/codec/uleaddvaudio.c | 7 ++++--- modules/codec/videotoolbox.m | 2 +- modules/codec/vpx.c | 2 +- 30 files changed, 65 insertions(+), 50 deletions(-) diff --git a/modules/codec/a52.c b/modules/codec/a52.c index 4fec50c7c073..6a9d9bab78a9 100644 --- a/modules/codec/a52.c +++ b/modules/codec/a52.c @@ -174,7 +174,7 @@ static block_t *DecodeBlock( 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) ) + if( (*pp_block)->i_flags&(BLOCK_FLAG_CORRUPTED) ) { if( (*pp_block)->i_flags&BLOCK_FLAG_CORRUPTED ) { @@ -185,6 +185,10 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) block_Release( *pp_block ); return NULL; } + if( (*pp_block)->i_flags & BLOCK_FLAG_DISCONTINUITY ) + { + date_Set( &p_sys->end_date, 0 ); + } if( !date_Get( &p_sys->end_date ) && (*pp_block)->i_pts <= VLC_TS_INVALID) { diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c index 08255b8be1bb..841060be0a14 100644 --- a/modules/codec/avcodec/audio.c +++ b/modules/codec/avcodec/audio.c @@ -261,7 +261,7 @@ static block_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block ) if( p_sys->b_delayed_open ) goto end; - if( p_block->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) ) + if( p_block->i_flags & (BLOCK_FLAG_CORRUPTED) ) { avcodec_flush_buffers( ctx ); date_Set( &p_sys->end_date, VLC_TS_INVALID ); @@ -272,6 +272,11 @@ static block_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block ) goto end; } + if( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY ) + { + avcodec_flush_buffers( ctx ); + date_Set( &p_sys->end_date, VLC_TS_INVALID ); + } /* We've just started the stream, wait for the first PTS. */ if( !date_Get( &p_sys->end_date ) && p_block->i_pts <= VLC_TS_INVALID ) diff --git a/modules/codec/avcodec/subtitle.c b/modules/codec/avcodec/subtitle.c index 5db71bd3e6ce..c867e8a59392 100644 --- a/modules/codec/avcodec/subtitle.c +++ b/modules/codec/avcodec/subtitle.c @@ -124,11 +124,13 @@ static subpicture_t *DecodeSubtitle(decoder_t *dec, block_t **block_ptr) block_t *block = *block_ptr; - if (block->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED)) { + if (block->i_flags & (BLOCK_FLAG_CORRUPTED)) { block_Release(block); avcodec_flush_buffers(sys->p_context); return NULL; } + if (block->i_flags & BLOCK_FLAG_DISCONTINUITY) + avcodec_flush_buffers(sys->p_context); if (block->i_buffer <= 0) { block_Release(block); diff --git a/modules/codec/bpg.c b/modules/codec/bpg.c index 6ec49c7ee347..255ab4ad79a8 100644 --- a/modules/codec/bpg.c +++ b/modules/codec/bpg.c @@ -102,7 +102,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) p_block = *pp_block; - if( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY ) + if( p_block->i_flags & BLOCK_FLAG_CORRUPTED ) { block_Release(p_block); *pp_block = NULL; diff --git a/modules/codec/cdg.c b/modules/codec/cdg.c index 5a28a33799d1..7bcaad9dbe35 100644 --- a/modules/codec/cdg.c +++ b/modules/codec/cdg.c @@ -143,7 +143,7 @@ static picture_t *Decode( decoder_t *p_dec, block_t **pp_block ) return NULL; p_block = *pp_block; - if( p_block->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) ) + if( p_block->i_flags & (BLOCK_FLAG_CORRUPTED) ) { p_sys->i_packet = 0; goto exit; diff --git a/modules/codec/crystalhd.c b/modules/codec/crystalhd.c index 87c2134654fa..2cc43fb9b06a 100644 --- a/modules/codec/crystalhd.c +++ b/modules/codec/crystalhd.c @@ -443,7 +443,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) p_block = *pp_block; if( p_block ) { - if( ( p_block->i_flags&(BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) ) == 0 ) + if( ( p_block->i_flags&(BLOCK_FLAG_CORRUPTED) ) == 0 ) { /* Valid input block, so we can send to HW to decode */ diff --git a/modules/codec/daala.c b/modules/codec/daala.c index 5d7685b65783..ae790ddb35fd 100644 --- a/modules/codec/daala.c +++ b/modules/codec/daala.c @@ -404,7 +404,7 @@ static void *ProcessPacket( decoder_t *p_dec, ogg_packet *p_oggpacket, block_t *p_block = *pp_block; void *p_buf; - if( ( p_block->i_flags&(BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) ) != 0 ) + if( ( p_block->i_flags&(BLOCK_FLAG_CORRUPTED) ) != 0 ) { /* Don't send the the first packet after a discontinuity to * daala_decode, otherwise we get purple/green display artifacts diff --git a/modules/codec/ddummy.c b/modules/codec/ddummy.c index 91289d116091..9bcdf978f52b 100644 --- a/modules/codec/ddummy.c +++ b/modules/codec/ddummy.c @@ -130,7 +130,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) if( stream != NULL && p_block->i_buffer > 0 - && !(p_block->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED)) ) + && !(p_block->i_flags & (BLOCK_FLAG_CORRUPTED)) ) { fwrite( p_block->p_buffer, 1, p_block->i_buffer, stream ); msg_Dbg( p_dec, "dumped %zu bytes", p_block->i_buffer ); diff --git a/modules/codec/dts.c b/modules/codec/dts.c index 991412c679aa..ebe5414ffb41 100644 --- a/modules/codec/dts.c +++ b/modules/codec/dts.c @@ -174,17 +174,16 @@ static block_t *DecodeBlock( 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) ) + if( (*pp_block)->i_flags&(BLOCK_FLAG_CORRUPTED) ) { - if( (*pp_block)->i_flags&BLOCK_FLAG_CORRUPTED ) - { - p_sys->i_state = STATE_NOSYNC; - block_BytestreamEmpty( &p_sys->bytestream ); - } + p_sys->i_state = STATE_NOSYNC; + block_BytestreamEmpty( &p_sys->bytestream ); date_Set( &p_sys->end_date, 0 ); block_Release( *pp_block ); return NULL; } + if( (*pp_block)->i_flags & BLOCK_FLAG_DISCONTINUITY ) + date_Set( &p_sys->end_date, 0 ); if( !date_Get( &p_sys->end_date ) && (*pp_block)->i_pts <= VLC_TS_INVALID ) { diff --git a/modules/codec/faad.c b/modules/codec/faad.c index ae8fed8102d3..944c376d9575 100644 --- a/modules/codec/faad.c +++ b/modules/codec/faad.c @@ -210,7 +210,7 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) p_block = *pp_block; - if( p_block->i_flags&(BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) ) + if( p_block->i_flags&(BLOCK_FLAG_CORRUPTED) ) { block_Release( p_block ); return NULL; diff --git a/modules/codec/flac.c b/modules/codec/flac.c index 9fc69f8cdc94..8ed2b5c755a0 100644 --- a/modules/codec/flac.c +++ b/modules/codec/flac.c @@ -500,7 +500,7 @@ static block_t *DecodeBlock( 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) ) + if( (*pp_block)->i_flags&(BLOCK_FLAG_CORRUPTED) ) { block_Release( *pp_block ); return NULL; diff --git a/modules/codec/gstdecode.c b/modules/codec/gstdecode.c index a2acf6992341..7615b4502b30 100644 --- a/modules/codec/gstdecode.c +++ b/modules/codec/gstdecode.c @@ -679,8 +679,11 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) p_sys->b_prerolled = false; } - block_Release( p_block ); - goto done; + if( p_block->i_flags & BLOCK_FLAG_CORRUPTED ) + { + block_Release( p_block ); + goto done; + } } if( likely( p_block->i_buffer ) ) diff --git a/modules/codec/jpeg.c b/modules/codec/jpeg.c index 454ae95241f4..c9053ae1890e 100644 --- a/modules/codec/jpeg.c +++ b/modules/codec/jpeg.c @@ -199,7 +199,7 @@ static picture_t *DecodeBlock(decoder_t *p_dec, block_t **pp_block) p_block = *pp_block; - if (p_block->i_flags & BLOCK_FLAG_DISCONTINUITY) + if (p_block->i_flags & BLOCK_FLAG_CORRUPTED ) { block_Release(p_block); *pp_block = NULL; diff --git a/modules/codec/kate.c b/modules/codec/kate.c index 73c5bce4a4ae..eea28b3170e9 100644 --- a/modules/codec/kate.c +++ b/modules/codec/kate.c @@ -480,9 +480,12 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) vlc_mutex_unlock( &p_sys->lock ); } #endif - p_sys->i_max_stop = VLC_TS_INVALID; - block_Release( p_block ); - return NULL; + if( p_block->i_flags & BLOCK_FLAG_CORRUPTED ) + { + p_sys->i_max_stop = VLC_TS_INVALID; + block_Release( p_block ); + return NULL; + } } /* Block to Kate packet */ diff --git a/modules/codec/libass.c b/modules/codec/libass.c index 067ef6b2a579..f7fd31995a30 100644 --- a/modules/codec/libass.c +++ b/modules/codec/libass.c @@ -307,7 +307,7 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) return NULL; p_block = *pp_block; - if( p_block->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) ) + if( p_block->i_flags & (BLOCK_FLAG_CORRUPTED) ) { p_sys->i_max_stop = VLC_TS_INVALID; block_Release( p_block ); diff --git a/modules/codec/libmpeg2.c b/modules/codec/libmpeg2.c index ff5a56e00801..85c4b6f89074 100644 --- a/modules/codec/libmpeg2.c +++ b/modules/codec/libmpeg2.c @@ -261,7 +261,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) return NULL; p_block = *pp_block; - if( p_block->i_flags & (BLOCK_FLAG_DISCONTINUITY | BLOCK_FLAG_CORRUPTED) ) + if( p_block->i_flags & (BLOCK_FLAG_CORRUPTED) ) Reset( p_dec ); while( 1 ) diff --git a/modules/codec/mft.c b/modules/codec/mft.c index 696319a2c8bc..e95c4ca6bae0 100644 --- a/modules/codec/mft.c +++ b/modules/codec/mft.c @@ -777,7 +777,7 @@ static void *DecodeSync(decoder_t *p_dec, block_t **pp_block) return NULL; block_t *p_block = *pp_block; - if (p_block->i_flags & (BLOCK_FLAG_DISCONTINUITY | BLOCK_FLAG_CORRUPTED)) + if (p_block->i_flags & (BLOCK_FLAG_CORRUPTED)) { block_Release(p_block); return NULL; @@ -839,10 +839,9 @@ static void *DecodeAsync(decoder_t *p_dec, block_t **pp_block) return NULL; block_t *p_block = *pp_block; - if (p_block->i_flags & (BLOCK_FLAG_DISCONTINUITY | BLOCK_FLAG_CORRUPTED)) + if (p_block->i_flags & (BLOCK_FLAG_CORRUPTED)) { block_Release(p_block); - return NULL; } diff --git a/modules/codec/mpeg_audio.c b/modules/codec/mpeg_audio.c index 0abf6b4ba174..99560912a501 100644 --- a/modules/codec/mpeg_audio.c +++ b/modules/codec/mpeg_audio.c @@ -201,18 +201,19 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) block_t *p_block = pp_block ? *pp_block : NULL; if (p_block) { - if( p_block->i_flags&(BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) ) + if( p_block->i_flags&(BLOCK_FLAG_CORRUPTED) ) { - if( p_block->i_flags&BLOCK_FLAG_CORRUPTED ) - { - p_sys->i_state = STATE_NOSYNC; - block_BytestreamEmpty( &p_sys->bytestream ); - } + p_sys->i_state = STATE_NOSYNC; + block_BytestreamEmpty( &p_sys->bytestream ); date_Set( &p_sys->end_date, 0 ); block_Release( p_block ); - p_sys->b_discontinuity = true; return NULL; } + if( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY ) + { + date_Set( &p_sys->end_date, 0 ); + p_sys->b_discontinuity = true; + } if( !date_Get( &p_sys->end_date ) && p_block->i_pts <= VLC_TS_INVALID ) { @@ -292,7 +293,6 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) msg_Dbg( p_dec, "emulated startcode" ); block_SkipByte( &p_sys->bytestream ); p_sys->i_state = STATE_NOSYNC; - p_sys->b_discontinuity = true; break; } @@ -367,7 +367,6 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) msg_Dbg( p_dec, "emulated startcode on next frame" ); block_SkipByte( &p_sys->bytestream ); p_sys->i_state = STATE_NOSYNC; - p_sys->b_discontinuity = true; break; } diff --git a/modules/codec/mpg123.c b/modules/codec/mpg123.c index 3a5d07aee82d..c329fdca1c98 100644 --- a/modules/codec/mpg123.c +++ b/modules/codec/mpg123.c @@ -93,7 +93,7 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) goto error; } - if( p_block->i_flags & ( BLOCK_FLAG_DISCONTINUITY | BLOCK_FLAG_CORRUPTED ) ) + if( p_block->i_flags & ( BLOCK_FLAG_CORRUPTED ) ) { date_Set( &p_sys->end_date, 0 ); goto error; diff --git a/modules/codec/png.c b/modules/codec/png.c index 36ed4446e791..85ab75b65cbd 100644 --- a/modules/codec/png.c +++ b/modules/codec/png.c @@ -205,7 +205,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) p_block = *pp_block; p_sys->b_error = false; - if( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY ) + if( p_block->i_flags & BLOCK_FLAG_CORRUPTED ) { block_Release( p_block ); *pp_block = NULL; return NULL; diff --git a/modules/codec/scte27.c b/modules/codec/scte27.c index 527e4e450482..869671040131 100644 --- a/modules/codec/scte27.c +++ b/modules/codec/scte27.c @@ -416,7 +416,7 @@ static subpicture_t *Decode(decoder_t *dec, block_t **block) subpicture_t *sub_first = NULL; subpicture_t **sub_last = &sub_first; - if (b->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED)) + if (b->i_flags & (BLOCK_FLAG_CORRUPTED)) goto exit; while (b->i_buffer > 3) { diff --git a/modules/codec/sdl_image.c b/modules/codec/sdl_image.c index e3d7bc6da7ce..2e0fe3a97931 100644 --- a/modules/codec/sdl_image.c +++ b/modules/codec/sdl_image.c @@ -137,7 +137,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) if( pp_block == NULL || *pp_block == NULL ) return NULL; p_block = *pp_block; - if( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY ) + if( p_block->i_flags & BLOCK_FLAG_CORRUPTED ) { block_Release( p_block ); *pp_block = NULL; return NULL; diff --git a/modules/codec/stl.c b/modules/codec/stl.c index e2f8a20c9e83..4bfa25e64d87 100644 --- a/modules/codec/stl.c +++ b/modules/codec/stl.c @@ -113,7 +113,7 @@ static subpicture_t *Decode(decoder_t *dec, block_t **block) subpicture_t *sub = NULL; block_t *b = *block; *block = NULL; - if (b->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED)) + if (b->i_flags & (BLOCK_FLAG_CORRUPTED)) goto exit; if (b->i_buffer < 128) goto exit; diff --git a/modules/codec/subsdec.c b/modules/codec/subsdec.c index 22037f7e169c..c005192fd2e6 100644 --- a/modules/codec/subsdec.c +++ b/modules/codec/subsdec.c @@ -329,7 +329,7 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) return NULL; p_block = *pp_block; - if( p_block->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) ) + if( p_block->i_flags & (BLOCK_FLAG_CORRUPTED) ) { block_Release( p_block ); return NULL; diff --git a/modules/codec/substx3g.c b/modules/codec/substx3g.c index 39bb4100efde..b4b08d6b4c8a 100644 --- a/modules/codec/substx3g.c +++ b/modules/codec/substx3g.c @@ -282,7 +282,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block ) p_block = *pp_block; *pp_block = NULL; - if( ( p_block->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) ) || + if( ( p_block->i_flags & (BLOCK_FLAG_CORRUPTED) ) || p_block->i_buffer < sizeof(uint16_t) ) { block_Release( p_block ); diff --git a/modules/codec/svcdsub.c b/modules/codec/svcdsub.c index a18fa697968e..df332093648e 100644 --- a/modules/codec/svcdsub.c +++ b/modules/codec/svcdsub.c @@ -234,7 +234,7 @@ static block_t *Reassemble( decoder_t *p_dec, block_t *p_block ) uint16_t i_expected_image; uint8_t i_packet, i_expected_packet; - if( p_block->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) ) + if( p_block->i_flags & (BLOCK_FLAG_CORRUPTED) ) { block_Release( p_block ); return NULL; diff --git a/modules/codec/svg.c b/modules/codec/svg.c index 47274fbdd245..dae8faf253cc 100644 --- a/modules/codec/svg.c +++ b/modules/codec/svg.c @@ -136,7 +136,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) p_block = *pp_block; *pp_block = NULL; - if( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY ) + if( p_block->i_flags & BLOCK_FLAG_CORRUPTED) { block_Release( p_block ); return NULL; diff --git a/modules/codec/uleaddvaudio.c b/modules/codec/uleaddvaudio.c index dbbd0b476af6..6f698fed0363 100644 --- a/modules/codec/uleaddvaudio.c +++ b/modules/codec/uleaddvaudio.c @@ -62,13 +62,14 @@ static block_t *Decode(decoder_t *dec, block_t **block_ptr) return NULL; block_t *block = *block_ptr; - if (block->i_flags & (BLOCK_FLAG_DISCONTINUITY | BLOCK_FLAG_CORRUPTED)) { - if (block->i_flags & BLOCK_FLAG_CORRUPTED) { - } + if (block->i_flags & BLOCK_FLAG_CORRUPTED) { date_Set(&sys->end_date, 0); block_Release(block); return NULL; } + if (block->i_flags & BLOCK_FLAG_DISCONTINUITY) { + date_Set(&sys->end_date, 0); + } if (block->i_pts > VLC_TS_INVALID && block->i_pts != date_Get(&sys->end_date)) diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m index d6625289ea03..5588fdb87b36 100644 --- a/modules/codec/videotoolbox.m +++ b/modules/codec/videotoolbox.m @@ -931,7 +931,7 @@ static void copy420YpCbCr8Planar(picture_t *p_pic, p_block = *pp_block; if (likely(p_block != NULL)) { - if (unlikely(p_block->i_flags&(BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED))) { + if (unlikely(p_block->i_flags&(BLOCK_FLAG_CORRUPTED))) { if (likely(p_sys->b_started)) { @synchronized(p_sys->outputTimeStamps) { [p_sys->outputTimeStamps removeAllObjects]; diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c index f17444ab0a00..478c34bad68f 100644 --- a/modules/codec/vpx.c +++ b/modules/codec/vpx.c @@ -72,7 +72,7 @@ static picture_t *Decode(decoder_t *dec, block_t **pp_block) if (!block) return NULL; - if (block->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED)) + if (block->i_flags & (BLOCK_FLAG_CORRUPTED)) return NULL; /* Associate packet PTS with decoded frame */