[vlc-commits] converter/tospdif: need valid i_frame_length/i_bytes_per_frame
Thomas Guillem
git at videolan.org
Wed Oct 5 18:19:04 CEST 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Sep 30 11:07:06 2016 +0200| [a5a5f7b89eb2471e7869fbf18d8ac5b64d73072a] | committer: Thomas Guillem
converter/tospdif: need valid i_frame_length/i_bytes_per_frame
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a5a5f7b89eb2471e7869fbf18d8ac5b64d73072a
---
modules/audio_filter/converter/tospdif.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/audio_filter/converter/tospdif.c b/modules/audio_filter/converter/tospdif.c
index a0b3572..7e42c38 100644
--- a/modules/audio_filter/converter/tospdif.c
+++ b/modules/audio_filter/converter/tospdif.c
@@ -315,6 +315,10 @@ static int Open( vlc_object_t *p_this )
filter_t *p_filter = (filter_t *)p_this;
filter_sys_t *p_sys;
+ if( p_filter->fmt_in.audio.i_frame_length == 0
+ || p_filter->fmt_in.audio.i_bytes_per_frame == 0 )
+ return VLC_EGENERIC;
+
if( ( p_filter->fmt_in.audio.i_format != VLC_CODEC_DTS &&
p_filter->fmt_in.audio.i_format != VLC_CODEC_A52 &&
p_filter->fmt_in.audio.i_format != VLC_CODEC_EAC3 ) ||
More information about the vlc-commits
mailing list