Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
BREW_PREFIX="$(brew --prefix)"
set-env HOST_CC "clang"
set-env HOST_CXX "clang++"
set-env CFLAGS "-Wno-error=deprecated-declarations -Wno-error=unknown-pragmas -fsanitize=undefined -fsanitize=address -fsanitize-address-use-after-scope -fsanitize-recover=all -fno-omit-frame-pointer -fno-optimize-sibling-calls -I$BREW_PREFIX/include"
set-env CFLAGS "-Wno-error=deprecated-declarations -fsanitize=undefined -fsanitize=address -fsanitize-address-use-after-scope -fsanitize-recover=all -fno-omit-frame-pointer -fno-optimize-sibling-calls -I$BREW_PREFIX/include"
set-env LDFLAGS "-fsanitize=undefined -fsanitize=address -L$BREW_PREFIX/lib"
set-env DISABLE_VALGRIND "1"
set-env ld_preload_san "$(clang --print-file-name libclang_rt.asan_osx_dynamic.dylib)"
Expand Down
41 changes: 22 additions & 19 deletions lib/upipe-x265/upipe_x265.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,25 @@
#include <x265_config.h>

/* fix undef warnings in x265.h */
#ifndef ENABLE_LIBVMAF
# define ENABLE_LIBVMAF 0
#endif
#ifndef _MSC_VER
# define _MSC_VER 0
#endif
#ifndef X265_DEPTH
# define X265_DEPTH 0
#endif
#ifndef ENABLE_MULTIVIEW
# define ENABLE_MULTIVIEW 0
#endif
#ifndef ENABLE_ALPHA
# define ENABLE_ALPHA 0
#endif
#ifndef ENABLE_SCC_EXT
# define ENABLE_SCC_EXT 0
#if X265_BUILD < 217
# ifndef ENABLE_LIBVMAF
# define ENABLE_LIBVMAF 0
# endif
# ifndef _MSC_VER
# define _MSC_VER 0
# endif
# ifndef X265_DEPTH
# define X265_DEPTH 0
# endif
# ifndef ENABLE_MULTIVIEW
# define ENABLE_MULTIVIEW 0
# endif
# ifndef ENABLE_ALPHA
# define ENABLE_ALPHA 0
# endif
# ifndef ENABLE_SCC_EXT
# define ENABLE_SCC_EXT 0
# endif
#endif

#include <x265.h>
Expand Down Expand Up @@ -668,6 +670,7 @@ static bool upipe_x265_open(struct upipe *upipe, int width, int height)
const char *def = OUT_FLOW;
if (unlikely(!ubase_check(uref_flow_set_def(flow_def_attr, def)))) {
upipe_throw_fatal(upipe, UBASE_ERR_ALLOC);
uref_free(flow_def_attr);
return false;
}
UBASE_FATAL(upipe, uref_flow_set_complete(flow_def_attr))
Expand Down Expand Up @@ -1353,9 +1356,9 @@ static int upipe_x265_set_flow_def(struct upipe *upipe,

struct urational fps;
uint64_t hsize, vsize;
if (!ubase_check(uref_pic_flow_get_fps(flow_def, &fps) ||
if (!ubase_check(uref_pic_flow_get_fps(flow_def, &fps)) ||
!ubase_check(uref_pic_flow_get_hsize(flow_def, &hsize)) ||
!ubase_check(uref_pic_flow_get_vsize(flow_def, &vsize)))) {
!ubase_check(uref_pic_flow_get_vsize(flow_def, &vsize))) {
upipe_err(upipe, "incompatible flow def");
uref_free(flow_def_check);
return UBASE_ERR_INVALID;
Expand Down
Loading