diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-23 12:53:49 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-23 12:53:49 +0200 |
commit | 027f21ebe37a7fba76ecbf94e3e22d6fcfd0a304 (patch) | |
tree | e1d4d2c744031e06de9def0930e4fb8a5c8881d6 /src/audio/player.c | |
parent | f6d26e8395b84aff8ae22abe554b143efc178291 (diff) |
Audio: Give up if failed to decode Ogg Vorbis data
IssueID #169
Diffstat (limited to 'src/audio/player.c')
-rw-r--r-- | src/audio/player.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/audio/player.c b/src/audio/player.c index 1c8538b4..762cff7a 100644 --- a/src/audio/player.c +++ b/src/audio/player.c | |||
@@ -566,6 +566,9 @@ static iContentSpec contentSpec_Player_(const iPlayer *d) { | |||
566 | stb_vorbis *vrb = stb_vorbis_open_pushdata( | 566 | stb_vorbis *vrb = stb_vorbis_open_pushdata( |
567 | constData_Block(&d->data->data), size_Block(&d->data->data), &consumed, &error, NULL); | 567 | constData_Block(&d->data->data), size_Block(&d->data->data), &consumed, &error, NULL); |
568 | if (!vrb) { | 568 | if (!vrb) { |
569 | if (error != VORBIS_need_more_data) { | ||
570 | content.type = none_DecoderType; | ||
571 | } | ||
569 | return content; | 572 | return content; |
570 | } | 573 | } |
571 | const stb_vorbis_info info = stb_vorbis_get_info(vrb); | 574 | const stb_vorbis_info info = stb_vorbis_get_info(vrb); |