aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/oggvorbis_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder/oggvorbis_plugin.c')
-rw-r--r--src/decoder/oggvorbis_plugin.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/decoder/oggvorbis_plugin.c b/src/decoder/oggvorbis_plugin.c
index 539a8e092..3a5614fd0 100644
--- a/src/decoder/oggvorbis_plugin.c
+++ b/src/decoder/oggvorbis_plugin.c
@@ -288,6 +288,15 @@ oggvorbis_decode(struct decoder *decoder, struct input_stream *inStream)
audio_format.channels = vi->channels;
audio_format.sample_rate = vi->rate;
+
+ if (!audio_format_valid(&audio_format)) {
+ g_warning("Invalid audio format: %u:%u:%u\n",
+ audio_format.sample_rate,
+ audio_format.bits,
+ audio_format.channels);
+ break;
+ }
+
if (!initialized) {
float total_time = ov_time_total(&vf, -1);
if (total_time < 0)