summaryrefslogtreecommitdiff
path: root/thirdparty/opus/stream.c
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-11-18 09:56:18 +0100
committerRémi Verschelde <rverschelde@gmail.com>2019-11-18 09:56:48 +0100
commit46ae64cd60166ead412bacc1bf03e9c8f8965e2c (patch)
tree9e592667ffa91e55491a66733e5e3d7de0b666c9 /thirdparty/opus/stream.c
parent974646309bfe09c48c8a72bf751b0ea6ad8b5bc5 (diff)
Revert "Update opus to 1.3.1 and opusfile to 0.11"
This reverts commit e00426c512a7905f5f925d382c443bab7a0ca693. The way we handle platform-specific intrinsics is not good, so the current state will not compile on armv8. This commit also requires SSE4.1 support, which is likely not a good idea for portable binaries. We'll have to redo this with more caution after 3.2 is released, or we might simply drop opus as we're only using it as dependency for theora right now. Fixes #33606.
Diffstat (limited to 'thirdparty/opus/stream.c')
-rw-r--r--thirdparty/opus/stream.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/thirdparty/opus/stream.c b/thirdparty/opus/stream.c
index 6a85197a66..0238a6b31b 100644
--- a/thirdparty/opus/stream.c
+++ b/thirdparty/opus/stream.c
@@ -235,7 +235,8 @@ void *op_fopen(OpusFileCallbacks *_cb,const char *_path,const char *_mode){
fp=fopen(_path,_mode);
#else
fp=NULL;
- {
+ if(_path==NULL||_mode==NULL)errno=EINVAL;
+ else{
wchar_t *wpath;
wchar_t *wmode;
wpath=op_utf8_to_utf16(_path);
@@ -265,7 +266,8 @@ void *op_freopen(OpusFileCallbacks *_cb,const char *_path,const char *_mode,
fp=freopen(_path,_mode,(FILE *)_stream);
#else
fp=NULL;
- {
+ if(_path==NULL||_mode==NULL)errno=EINVAL;
+ else{
wchar_t *wpath;
wchar_t *wmode;
wpath=op_utf8_to_utf16(_path);