[vlc-commits] packetizer: use date_Change()

Rémi Denis-Courmont git at videolan.org
Fri May 4 12:40:09 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri May  4 13:39:27 2018 +0300| [80d7c4fbf60d4a719af324cec600b879549cb341] | committer: Rémi Denis-Courmont

packetizer: use date_Change()

See also 110e4f8568f241ddc191f2ae6d0ed95e0a91a934.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=80d7c4fbf60d4a719af324cec600b879549cb341
---

 modules/packetizer/mlp.c        | 6 +-----
 modules/packetizer/mpeg4audio.c | 5 +----
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/modules/packetizer/mlp.c b/modules/packetizer/mlp.c
index 660a23f01f..ab78068ad5 100644
--- a/modules/packetizer/mlp.c
+++ b/modules/packetizer/mlp.c
@@ -427,11 +427,7 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
                           p_sys->mlp.i_channels, p_sys->mlp.i_rate );
 
                 if( p_sys->mlp.i_rate > 0 )
-                {
-                    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, i_end_date );
-                }
+                    date_Change( &p_sys->end_date, p_sys->mlp.i_rate, 1 );
             }
 
             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 a5047f7318..3814dda031 100644
--- a/modules/packetizer/mpeg4audio.c
+++ b/modules/packetizer/mpeg4audio.c
@@ -967,10 +967,7 @@ 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, i_end_date);
+        date_Change(&p_sys->end_date, p_sys->i_rate, 1);
     }
 
     p_dec->fmt_out.audio.i_rate     = p_sys->i_rate;



More information about the vlc-commits mailing list