Commit 633d25f6 authored by Rémi Denis-Courmont's avatar 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
(cherry picked from commit c028792ebaaa4579b2902e9c9e630a3a61fef3d1)
parent be2e9266
......@@ -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 *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment