A/52 spdif output was broken by the switch over to the new filter API.
* a52tofloat32 should only take control if there is _no_ spdif
output requested otherwise the decoded stream ends up on the spdif
device
* a52tospdif has to set a pts/dts value otherwise the frames get
(wrongfully) discarded as too late because a wrong pts/dts value
got evaluated by aout_OutputNextBuffer()
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
filter_sys_t *p_sys;
int i_ret;
- if( p_filter->fmt_in.i_codec != VLC_CODEC_A52 )
+ if( p_filter->fmt_in.i_codec != VLC_CODEC_A52 ||
+ p_filter->fmt_out.audio.i_format == VLC_CODEC_SPDIFB ||
+ p_filter->fmt_out.audio.i_format == VLC_CODEC_SPDIFL )
{
return VLC_EGENERIC;
}
vlc_memset( p_out + 8 + i_frame_size * 2, 0,
AOUT_SPDIF_SIZE - i_frame_size * 2 - 8 );
+ p_out_buf->i_dts = p_in_buf->i_dts;
+ p_out_buf->i_pts = p_in_buf->i_pts;
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_buffer = AOUT_SPDIF_SIZE;
out: