[vlc-devel] commit: fix A/52 spdif output regression (Matthias Dahl )
git version control
git at videolan.org
Tue Nov 24 21:51:08 CET 2009
vlc | branch: master | Matthias Dahl <khaos.dev at binary-island.eu> | Mon Nov 16 17:21:16 2009 +0100| [baa1ec0106aea6a196238f8747ef751894e26579] | committer: Rémi Denis-Courmont
fix A/52 spdif output regression
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 at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=baa1ec0106aea6a196238f8747ef751894e26579
---
modules/audio_filter/converter/a52tofloat32.c | 4 +++-
modules/audio_filter/converter/a52tospdif.c | 2 ++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/modules/audio_filter/converter/a52tofloat32.c b/modules/audio_filter/converter/a52tofloat32.c
index 368931e..d2342d7 100644
--- a/modules/audio_filter/converter/a52tofloat32.c
+++ b/modules/audio_filter/converter/a52tofloat32.c
@@ -353,7 +353,9 @@ static int OpenFilter( vlc_object_t *p_this )
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;
}
diff --git a/modules/audio_filter/converter/a52tospdif.c b/modules/audio_filter/converter/a52tospdif.c
index 89d2a25..8ee261c 100644
--- a/modules/audio_filter/converter/a52tospdif.c
+++ b/modules/audio_filter/converter/a52tospdif.c
@@ -111,6 +111,8 @@ static block_t *DoWork( filter_t * p_filter, block_t *p_in_buf )
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:
More information about the vlc-devel
mailing list