[vlc-devel] commit: Correctly reset date after a discontinuity in audio decoder. ( Laurent Aimar )
git version control
git at videolan.org
Sun Nov 30 16:52:20 CET 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Nov 29 21:15:27 2008 +0100| [875bcdf157986d553b5a9c2b1105238154a1e9d0] | committer: Laurent Aimar
Correctly reset date after a discontinuity in audio decoder.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=875bcdf157986d553b5a9c2b1105238154a1e9d0
---
modules/codec/a52.c | 2 +-
modules/codec/avcodec/audio.c | 2 ++
modules/codec/dts.c | 2 +-
modules/codec/flac.c | 2 +-
modules/codec/mpeg_audio.c | 2 +-
modules/packetizer/mlp.c | 1 +
modules/packetizer/mpeg4audio.c | 2 +-
7 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/modules/codec/a52.c b/modules/codec/a52.c
index 82112f9..797f8d0 100644
--- a/modules/codec/a52.c
+++ b/modules/codec/a52.c
@@ -191,7 +191,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_sys->i_state = STATE_NOSYNC;
block_BytestreamFlush( &p_sys->bytestream );
}
-// aout_DateSet( &p_sys->end_date, 0 );
+ aout_DateSet( &p_sys->end_date, 0 );
block_Release( *pp_block );
return NULL;
}
diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index ba13919..e8a2a41 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -261,6 +261,8 @@ aout_buffer_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
{
block_Release( p_block );
avcodec_flush_buffers( p_sys->p_context );
+ p_sys->i_samples = 0;
+ aout_DateSet( &p_sys->end_date, 0 );
if( p_sys->i_codec_id == CODEC_ID_MP2 || p_sys->i_codec_id == CODEC_ID_MP3 )
p_sys->i_reject_count = 3;
diff --git a/modules/codec/dts.c b/modules/codec/dts.c
index 1dd9379..2486edc 100644
--- a/modules/codec/dts.c
+++ b/modules/codec/dts.c
@@ -179,7 +179,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_sys->i_state = STATE_NOSYNC;
block_BytestreamFlush( &p_sys->bytestream );
}
-// aout_DateSet( &p_sys->end_date, 0 );
+ aout_DateSet( &p_sys->end_date, 0 );
block_Release( *pp_block );
return NULL;
}
diff --git a/modules/codec/flac.c b/modules/codec/flac.c
index c9d8069..6ebd53c 100644
--- a/modules/codec/flac.c
+++ b/modules/codec/flac.c
@@ -388,7 +388,7 @@ static block_t *PacketizeBlock( decoder_t *p_dec, block_t **pp_block )
p_sys->i_state = STATE_NOSYNC;
block_BytestreamFlush( &p_sys->bytestream );
}
-// aout_DateSet( &p_sys->end_date, 0 );
+ aout_DateSet( &p_sys->end_date, 0 );
block_Release( *pp_block );
return NULL;
}
diff --git a/modules/codec/mpeg_audio.c b/modules/codec/mpeg_audio.c
index 96fe2aa..bb2493f 100644
--- a/modules/codec/mpeg_audio.c
+++ b/modules/codec/mpeg_audio.c
@@ -208,7 +208,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_sys->i_state = STATE_NOSYNC;
block_BytestreamFlush( &p_sys->bytestream );
}
-// aout_DateSet( &p_sys->end_date, 0 );
+ aout_DateSet( &p_sys->end_date, 0 );
block_Release( *pp_block );
p_sys->b_discontinuity = true;
return NULL;
diff --git a/modules/packetizer/mlp.c b/modules/packetizer/mlp.c
index 2a30849..92eb8a4 100644
--- a/modules/packetizer/mlp.c
+++ b/modules/packetizer/mlp.c
@@ -166,6 +166,7 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
p_sys->i_state = STATE_NOSYNC;
block_BytestreamFlush( &p_sys->bytestream );
}
+ aout_DateSet( &p_sys->end_date, 0 );
block_Release( *pp_block );
return NULL;
}
diff --git a/modules/packetizer/mpeg4audio.c b/modules/packetizer/mpeg4audio.c
index 7842480..2bf711b 100644
--- a/modules/packetizer/mpeg4audio.c
+++ b/modules/packetizer/mpeg4audio.c
@@ -290,7 +290,7 @@ static block_t *PacketizeRawBlock( decoder_t *p_dec, block_t **pp_block )
if( (*pp_block)->i_flags&(BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) )
{
- //aout_DateSet( &p_sys->end_date, 0 );
+ aout_DateSet( &p_sys->end_date, 0 );
block_Release( *pp_block );
return NULL;
}
More information about the vlc-devel
mailing list