diff --git a/c_src/xav/reader.c b/c_src/xav/reader.c index 9617227..6007652 100644 --- a/c_src/xav/reader.c +++ b/c_src/xav/reader.c @@ -2,7 +2,7 @@ #include "utils.h" #include -int reader_init(struct Reader *reader, char *path, size_t path_size, int device_flag, +int reader_init(struct Reader *reader, unsigned char *path, size_t path_size, int device_flag, enum AVMediaType media_type) { int ret; reader->path = XAV_ALLOC(path_size + 1); diff --git a/c_src/xav/reader.h b/c_src/xav/reader.h index 3226a42..6a7a31d 100644 --- a/c_src/xav/reader.h +++ b/c_src/xav/reader.h @@ -41,7 +41,7 @@ struct Reader { int *frame_linesize; }; -int reader_init(struct Reader *reader, char *path, size_t path_size, int device_flag, +int reader_init(struct Reader *reader, unsigned char *path, size_t path_size, int device_flag, enum AVMediaType media_type); int reader_next_frame(struct Reader *reader); diff --git a/c_src/xav/xav_nif.c b/c_src/xav/xav_nif.c index f3f1c56..f643771 100644 --- a/c_src/xav/xav_nif.c +++ b/c_src/xav/xav_nif.c @@ -109,7 +109,7 @@ ERL_NIF_TERM new_decoder(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) { struct Decoder *decoder = enif_alloc_resource(decoder_resource_type, sizeof(struct Decoder)); - int codec_len; + unsigned int codec_len; if (!enif_get_atom_length(env, argv[0], &codec_len, ERL_NIF_LATIN1)) { return xav_nif_raise(env, "failed_to_get_atom_length"); }