From 64fed650d429fdbdfa4011956a2c057dd0348914 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期三, 13 十一月 2019 14:21:59 +0800 Subject: [PATCH] bug fix --- libcffmpeg.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libcffmpeg.c b/libcffmpeg.c index 7c30caf..7faf09a 100644 --- a/libcffmpeg.c +++ b/libcffmpeg.c @@ -153,12 +153,12 @@ } // for encoder -cencoder wrap_fn_create_encoder(void *lib, const int w, const int h, const int fps, const int br, const int scale_flag, const int gi){ +cencoder wrap_fn_create_encoder(void *lib, const int w, const int h, const int fps, const int br, const int scale_flag, const int gi, const int fmt, const char *file){ if (!fn_create_encoder){ fn_create_encoder = (lib_cffmpeg_create_encoder)dlsym(lib, "c_ffmpeg_create_encoder"); release_if_err(fn_create_encoder, lib); } - return fn_create_encoder(w, h, fps, br, scale_flag, gi); + return fn_create_encoder(w, h, fps, br, scale_flag, gi, fmt, file); } void wrap_fn_destroy_encoder(void *lib, const cencoder h){ @@ -177,7 +177,7 @@ uint8_t *out = NULL; const int flag = fn_encode(hdl, (uint8_t*)in, w, h, &out, out_size, key); - if (flag > 0 && out != NULL) { + if (flag == 0 && out != NULL) { return out; } *out_size = 0; -- Gitblit v1.8.0