[vlc-devel] commit: Do not loose pts on stream properties changes. (Laurent Aimar )
git version control
git at videolan.org
Sat Feb 13 15:12:22 CET 2010
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Feb 13 14:37:52 2010 +0100| [110e4f8568f241ddc191f2ae6d0ed95e0a91a934] | committer: Laurent Aimar
Do not loose pts on stream properties changes.
It closes #2349.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=110e4f8568f241ddc191f2ae6d0ed95e0a91a934
---
modules/packetizer/flac.c | 3 ++-
modules/packetizer/mlp.c | 3 ++-
modules/packetizer/mpeg4audio.c | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/packetizer/flac.c b/modules/packetizer/flac.c
index 4d29a51..c001ea7 100644
--- a/modules/packetizer/flac.c
+++ b/modules/packetizer/flac.c
@@ -285,8 +285,9 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
if( p_sys->i_rate != p_dec->fmt_out.audio.i_rate )
{
p_dec->fmt_out.audio.i_rate = p_sys->i_rate;
+ const mtime_t i_end_date = date_Get( &p_sys->end_date );
date_Init( &p_sys->end_date, p_sys->i_rate, 1 );
- date_Set( &p_sys->end_date, p_sys->i_pts );
+ date_Set( &p_sys->end_date, i_end_date );
}
p_sys->i_state = STATE_NEXT_SYNC;
p_sys->i_frame_size = p_sys->b_stream_info && p_sys->stream_info.min_framesize > 0 ?
diff --git a/modules/packetizer/mlp.c b/modules/packetizer/mlp.c
index ee2479b..d466e77 100644
--- a/modules/packetizer/mlp.c
+++ b/modules/packetizer/mlp.c
@@ -302,8 +302,9 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
msg_Info( p_dec, "MLP channels: %d samplerate: %d",
p_sys->mlp.i_channels, p_sys->mlp.i_rate );
+ const mtime_t i_end_date = date_Get( &p_sys->end_date );
date_Init( &p_sys->end_date, p_sys->mlp.i_rate, 1 );
- date_Set( &p_sys->end_date, p_sys->i_pts );
+ date_Set( &p_sys->end_date, i_end_date );
}
p_dec->fmt_out.audio.i_rate = p_sys->mlp.i_rate;
diff --git a/modules/packetizer/mpeg4audio.c b/modules/packetizer/mpeg4audio.c
index f47aecb..3e4561c 100644
--- a/modules/packetizer/mpeg4audio.c
+++ b/modules/packetizer/mpeg4audio.c
@@ -1205,8 +1205,9 @@ static void SetupOutput( decoder_t *p_dec, block_t *p_block )
msg_Info( p_dec, "AAC channels: %d samplerate: %d",
p_sys->i_channels, p_sys->i_rate );
+ const mtime_t i_end_date = date_Get( &p_sys->end_date );
date_Init( &p_sys->end_date, p_sys->i_rate, 1 );
- date_Set( &p_sys->end_date, p_sys->i_pts );
+ date_Set( &p_sys->end_date, i_end_date );
}
p_dec->fmt_out.audio.i_rate = p_sys->i_rate;
More information about the vlc-devel
mailing list