Commit fcbdd605 authored by Diego Biurrun's avatar Diego Biurrun

nut: Use correct function pointer casts instead of void*

Fixes several warnings of the type
libavformat/nut.c:207:42: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
parent 3b50dbc5
...@@ -204,7 +204,8 @@ int ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts) ...@@ -204,7 +204,8 @@ int ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts)
sp->pos = pos; sp->pos = pos;
sp->back_ptr = back_ptr; sp->back_ptr = back_ptr;
sp->ts = ts; sp->ts = ts;
av_tree_insert(&nut->syncpoints, sp, (void *) ff_nut_sp_pos_cmp, &node); av_tree_insert(&nut->syncpoints, sp,
(int (*)(void *, const void *)) ff_nut_sp_pos_cmp, &node);
if (node) { if (node) {
av_free(sp); av_free(sp);
av_free(node); av_free(node);
......
...@@ -987,7 +987,8 @@ static int read_seek(AVFormatContext *s, int stream_index, ...@@ -987,7 +987,8 @@ static int read_seek(AVFormatContext *s, int stream_index,
pos2 = st->index_entries[index].pos; pos2 = st->index_entries[index].pos;
ts = st->index_entries[index].timestamp; ts = st->index_entries[index].timestamp;
} else { } else {
av_tree_find(nut->syncpoints, &dummy, (void *) ff_nut_sp_pts_cmp, av_tree_find(nut->syncpoints, &dummy,
(int (*)(void *, const void *)) ff_nut_sp_pts_cmp,
(void **) next_node); (void **) next_node);
av_log(s, AV_LOG_DEBUG, "%"PRIu64"-%"PRIu64" %"PRId64"-%"PRId64"\n", av_log(s, AV_LOG_DEBUG, "%"PRIu64"-%"PRIu64" %"PRId64"-%"PRId64"\n",
next_node[0]->pos, next_node[1]->pos, next_node[0]->ts, next_node[0]->pos, next_node[1]->pos, next_node[0]->ts,
...@@ -1000,7 +1001,8 @@ static int read_seek(AVFormatContext *s, int stream_index, ...@@ -1000,7 +1001,8 @@ static int read_seek(AVFormatContext *s, int stream_index,
if (!(flags & AVSEEK_FLAG_BACKWARD)) { if (!(flags & AVSEEK_FLAG_BACKWARD)) {
dummy.pos = pos + 16; dummy.pos = pos + 16;
next_node[1] = &nopts_sp; next_node[1] = &nopts_sp;
av_tree_find(nut->syncpoints, &dummy, (void *) ff_nut_sp_pos_cmp, av_tree_find(nut->syncpoints, &dummy,
(int (*)(void *, const void *)) ff_nut_sp_pos_cmp,
(void **) next_node); (void **) next_node);
pos2 = ff_gen_search(s, -2, dummy.pos, next_node[0]->pos, pos2 = ff_gen_search(s, -2, dummy.pos, next_node[0]->pos,
next_node[1]->pos, next_node[1]->pos, next_node[1]->pos, next_node[1]->pos,
...@@ -1011,7 +1013,8 @@ static int read_seek(AVFormatContext *s, int stream_index, ...@@ -1011,7 +1013,8 @@ static int read_seek(AVFormatContext *s, int stream_index,
// FIXME dir but I think it does not matter // FIXME dir but I think it does not matter
} }
dummy.pos = pos; dummy.pos = pos;
sp = av_tree_find(nut->syncpoints, &dummy, (void *) ff_nut_sp_pos_cmp, sp = av_tree_find(nut->syncpoints, &dummy,
(int (*)(void *, const void *)) ff_nut_sp_pos_cmp,
NULL); NULL);
assert(sp); assert(sp);
......
...@@ -807,7 +807,8 @@ static int nut_write_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -807,7 +807,8 @@ static int nut_write_packet(AVFormatContext *s, AVPacket *pkt)
} }
if (dummy.pos == INT64_MAX) if (dummy.pos == INT64_MAX)
dummy.pos = 0; dummy.pos = 0;
sp = av_tree_find(nut->syncpoints, &dummy, (void *)ff_nut_sp_pos_cmp, sp = av_tree_find(nut->syncpoints, &dummy,
(int (*)(void *, const void *)) ff_nut_sp_pos_cmp,
NULL); NULL);
nut->last_syncpoint_pos = avio_tell(bc); nut->last_syncpoint_pos = avio_tell(bc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment