diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-10-24 17:53:21 -0400 |
---|---|---|
committer | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-10-24 20:38:07 -0400 |
commit | 7c8fcbbde3a299096974f9061c8b5be0e526f4c2 (patch) | |
tree | 3321e27447af0c3b29aaba3b98d423d3bb7664bf /libavformat/nutdec.c | |
parent | 94f333f9dcfb4ed13d08e17949f7a929a1ece4b1 (diff) | |
download | ffmpeg-7c8fcbbde3a299096974f9061c8b5be0e526f4c2.tar.gz |
avutil/tree: add additional const qualifier to the comparator
libc's qsort comparator has a const qualifier on both arguments. This
adds a missing const qualifier to exactly match the comparator API.
Existing usages of av_tree_find, av_tree_insert are appropriately
modified: type signature changes of the comparators, and removal of
unnecessary void * casts of function pointers.
Reviewed-by: Henrik Gramner <henrik@gramner.com>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavformat/nutdec.c')
-rw-r--r-- | libavformat/nutdec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 63b0cd2fb9..deceb032e5 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -1271,7 +1271,7 @@ static int read_seek(AVFormatContext *s, int stream_index, pos2 = st->index_entries[index].pos; ts = st->index_entries[index].timestamp; } else { - av_tree_find(nut->syncpoints, &dummy, (void *) ff_nut_sp_pts_cmp, + av_tree_find(nut->syncpoints, &dummy, ff_nut_sp_pts_cmp, (void **) next_node); av_log(s, AV_LOG_DEBUG, "%"PRIu64"-%"PRIu64" %"PRId64"-%"PRId64"\n", next_node[0]->pos, next_node[1]->pos, next_node[0]->ts, @@ -1286,7 +1286,7 @@ static int read_seek(AVFormatContext *s, int stream_index, if (!(flags & AVSEEK_FLAG_BACKWARD)) { dummy.pos = pos + 16; next_node[1] = &nopts_sp; - av_tree_find(nut->syncpoints, &dummy, (void *) ff_nut_sp_pos_cmp, + av_tree_find(nut->syncpoints, &dummy, ff_nut_sp_pos_cmp, (void **) next_node); pos2 = ff_gen_search(s, -2, dummy.pos, next_node[0]->pos, next_node[1]->pos, next_node[1]->pos, @@ -1297,7 +1297,7 @@ static int read_seek(AVFormatContext *s, int stream_index, // FIXME dir but I think it does not matter } dummy.pos = pos; - sp = av_tree_find(nut->syncpoints, &dummy, (void *) ff_nut_sp_pos_cmp, + sp = av_tree_find(nut->syncpoints, &dummy, ff_nut_sp_pos_cmp, NULL); av_assert0(sp); |