Fixed audio date on rate change in FLAC packetizer.
authorLaurent Aimar <fenrir@videolan.org>
Sun, 20 Dec 2009 22:52:31 +0000 (23:52 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 20 Dec 2009 22:57:08 +0000 (23:57 +0100)
modules/codec/flac.c

index 9b8d1c0..3e4acbc 100644 (file)
@@ -478,6 +478,7 @@ static block_t *PacketizeBlock( decoder_t *p_dec, block_t **pp_block )
             {
                 p_dec->fmt_out.audio.i_rate = p_sys->i_rate;
                 date_Init( &p_sys->end_date, p_sys->i_rate, 1 );
             {
                 p_dec->fmt_out.audio.i_rate = p_sys->i_rate;
                 date_Init( &p_sys->end_date, p_sys->i_rate, 1 );
+                date_Set( &p_sys->end_date, p_sys->i_pts );
             }
             p_sys->i_state = STATE_NEXT_SYNC;
             p_sys->i_frame_size = 1;
             }
             p_sys->i_state = STATE_NEXT_SYNC;
             p_sys->i_frame_size = 1;