[vlc-commits] JACK: fix sampling rate (regression in VLC 2.0)

Rémi Denis-Courmont git at videolan.org
Fri May 4 18:44:41 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri May  4 19:40:15 2012 +0300| [c028792ebaaa4579b2902e9c9e630a3a61fef3d1] | committer: Rémi Denis-Courmont

JACK: fix sampling rate (regression in VLC 2.0)

The format must be initialized before aout_PacketInit().
Fix Debian #664279 and LP#987231.

Pointed-out-by: Walter Ösch

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

 modules/audio_output/jack.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/audio_output/jack.c b/modules/audio_output/jack.c
index f6fa254..86ffd2e 100644
--- a/modules/audio_output/jack.c
+++ b/modules/audio_output/jack.c
@@ -133,6 +133,11 @@ static int Open( vlc_object_t *p_this )
     jack_set_process_callback( p_sys->p_jack_client, Process, p_aout );
     jack_set_graph_order_callback ( p_sys->p_jack_client, GraphChange, p_aout );
 
+    /* JACK only supports fl32 format */
+    p_aout->format.i_format = VLC_CODEC_FL32;
+    // TODO add buffer size callback
+    p_aout->format.i_rate = jack_get_sample_rate( p_sys->p_jack_client );
+
     p_aout->pf_play = aout_PacketPlay;
     p_aout->pf_pause = aout_PacketPause;
     p_aout->pf_flush = aout_PacketFlush;
@@ -140,11 +145,6 @@ static int Open( vlc_object_t *p_this )
                      jack_get_buffer_size( p_sys->p_jack_client ) );
     aout_VolumeSoftInit( p_aout );
 
-    /* JACK only supports fl32 format */
-    p_aout->format.i_format = VLC_CODEC_FL32;
-    // TODO add buffer size callback
-    p_aout->format.i_rate = jack_get_sample_rate( p_sys->p_jack_client );
-
     p_sys->i_channels = aout_FormatNbChannels( &p_aout->format );
 
     p_sys->p_jack_ports = malloc( p_sys->i_channels *



More information about the vlc-commits mailing list