[vlc-commits] aout: don't accept unknown rates
Thomas Guillem
git at videolan.org
Thu Jan 25 14:59:18 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jan 25 14:56:14 2018 +0100| [154687459fb8ae0362970fd3b9e072fbfd2da484] | committer: Thomas Guillem
aout: don't accept unknown rates
If an aout module can't handle it (like pulseaudio), the input decoder will
fallback to the next decoder (avcodec) and passthough will never be tried
again.
Regression from 2b07680ad493ce2276404f9ee07916a72750f1c9.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=154687459fb8ae0362970fd3b9e072fbfd2da484
---
src/audio_output/dec.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 7a5eff67f6..cf7642ca08 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -56,19 +56,19 @@ int aout_DecNew( audio_output_t *p_aout,
msg_Err( p_aout, "invalid audio channels count" );
return -1;
}
+ }
- if( p_format->i_rate > 352800 )
- {
- msg_Err( p_aout, "excessive audio sample frequency (%u)",
- p_format->i_rate );
- return -1;
- }
- if( p_format->i_rate < 4000 )
- {
- msg_Err( p_aout, "too low audio sample frequency (%u)",
- p_format->i_rate );
- return -1;
- }
+ if( p_format->i_rate > 352800 )
+ {
+ msg_Err( p_aout, "excessive audio sample frequency (%u)",
+ p_format->i_rate );
+ return -1;
+ }
+ if( p_format->i_rate < 4000 )
+ {
+ msg_Err( p_aout, "too low audio sample frequency (%u)",
+ p_format->i_rate );
+ return -1;
}
aout_owner_t *owner = aout_owner(p_aout);
More information about the vlc-commits
mailing list