diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2010-03-28 09:59:58 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2010-03-28 09:59:58 +0000 |
commit | f990f6e3f786924e8350a647882c1f8dc48da547 (patch) | |
tree | 9442a25337a7f2756991b1b335edabb6ff670527 | |
parent | 4c1202f76eaf27b1eba667039ced7fa9d6cff198 (diff) | |
download | ffmpeg-f990f6e3f786924e8350a647882c1f8dc48da547.tar.gz |
Fix NUT (de)muxer warnings:
CC libavformat/nutdec.o
libavformat/nutdec.c: In function ‘read_seek’:
libavformat/nutdec.c:862: warning: passing argument 3 of ‘av_tree_find’ from incompatible pointer type
./libavutil/tree.h:44: note: expected ‘int (*)(void *, const void *)’ but argument is of type ‘int (*)(struct Syncpoint *, struct Syncpoint *)’
libavformat/nutdec.c:871: warning: passing argument 3 of ‘av_tree_find’ from incompatible pointer type
./libavutil/tree.h:44: note: expected ‘int (*)(void *, const void *)’ but argument is of type ‘int (*)(struct Syncpoint *, struct Syncpoint *)’
libavformat/nutdec.c:879: warning: passing argument 3 of ‘av_tree_find’ from incompatible pointer type
./libavutil/tree.h:44: note: expected ‘int (*)(void *, const void *)’ but argument is of type ‘int (*)(struct Syncpoint *, struct Syncpoint *)’
CC libavformat/nutenc.o
libavformat/nutenc.c: In function ‘write_packet’:
libavformat/nutenc.c:680: warning: passing argument 3 of ‘av_tree_find’ from incompatible pointer type
./libavutil/tree.h:44: note: expected ‘int (*)(void *, const void *)’ but argument is of type ‘int (*)(struct Syncpoint *, struct Syncpoint *)’
Originally committed as revision 22707 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/nut.c | 6 | ||||
-rw-r--r-- | libavformat/nut.h | 4 | ||||
-rw-r--r-- | libavformat/nutdec.c | 9 | ||||
-rw-r--r-- | libavformat/nutenc.c | 3 |
4 files changed, 13 insertions, 9 deletions
diff --git a/libavformat/nut.c b/libavformat/nut.c index 61c588c05a..9a6a41b21f 100644 --- a/libavformat/nut.c +++ b/libavformat/nut.c @@ -47,11 +47,11 @@ int64_t ff_lsb2full(StreamContext *stream, int64_t lsb){ return ((lsb - delta)&mask) + delta; } -int ff_nut_sp_pos_cmp(Syncpoint *a, Syncpoint *b){ +int ff_nut_sp_pos_cmp(const Syncpoint *a, const Syncpoint *b){ return ((a->pos - b->pos) >> 32) - ((b->pos - a->pos) >> 32); } -int ff_nut_sp_pts_cmp(Syncpoint *a, Syncpoint *b){ +int ff_nut_sp_pts_cmp(const Syncpoint *a, const Syncpoint *b){ return ((a->ts - b->ts) >> 32) - ((b->ts - a->ts) >> 32); } @@ -62,7 +62,7 @@ void ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts){ sp->pos= pos; sp->back_ptr= back_ptr; sp->ts= ts; - av_tree_insert(&nut->syncpoints, sp, ff_nut_sp_pos_cmp, &node); + av_tree_insert(&nut->syncpoints, sp, (void *) ff_nut_sp_pos_cmp, &node); if(node){ av_free(sp); av_free(node); diff --git a/libavformat/nut.h b/libavformat/nut.h index 8d9695245c..ce052dfedf 100644 --- a/libavformat/nut.h +++ b/libavformat/nut.h @@ -107,8 +107,8 @@ typedef struct { void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val); int64_t ff_lsb2full(StreamContext *stream, int64_t lsb); -int ff_nut_sp_pos_cmp(Syncpoint *a, Syncpoint *b); -int ff_nut_sp_pts_cmp(Syncpoint *a, Syncpoint *b); +int ff_nut_sp_pos_cmp(const Syncpoint *a, const Syncpoint *b); +int ff_nut_sp_pts_cmp(const Syncpoint *a, const Syncpoint *b); void ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts); void ff_nut_free_sp(NUTContext *nut); diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 6e0f1fcf97..d08683f54a 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -859,7 +859,8 @@ static int read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flag pos2= st->index_entries[index].pos; ts = st->index_entries[index].timestamp; }else{ - av_tree_find(nut->syncpoints, &dummy, ff_nut_sp_pts_cmp, (void **) next_node); + av_tree_find(nut->syncpoints, &dummy, (void *) 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 , next_node[1]->ts); pos= av_gen_search(s, -1, dummy.ts, next_node[0]->pos, next_node[1]->pos, next_node[1]->pos, @@ -868,7 +869,8 @@ static int read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flag if(!(flags & AVSEEK_FLAG_BACKWARD)){ dummy.pos= pos+16; next_node[1]= &nopts_sp; - av_tree_find(nut->syncpoints, &dummy, ff_nut_sp_pos_cmp, (void **) next_node); + av_tree_find(nut->syncpoints, &dummy, (void *) ff_nut_sp_pos_cmp, + (void **) next_node); pos2= av_gen_search(s, -2, dummy.pos, next_node[0]->pos , next_node[1]->pos, next_node[1]->pos, next_node[0]->back_ptr, next_node[1]->back_ptr, flags, &ts, nut_read_timestamp); if(pos2>=0) @@ -876,7 +878,8 @@ static int read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flag //FIXME dir but I think it does not matter } dummy.pos= pos; - sp= av_tree_find(nut->syncpoints, &dummy, ff_nut_sp_pos_cmp, NULL); + sp= av_tree_find(nut->syncpoints, &dummy, (void *) ff_nut_sp_pos_cmp, + NULL); assert(sp); pos2= sp->back_ptr - 15; diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index e06a85f54f..84ea29024e 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -677,7 +677,8 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt){ } if(dummy.pos == INT64_MAX) dummy.pos= 0; - sp= av_tree_find(nut->syncpoints, &dummy, ff_nut_sp_pos_cmp, NULL); + sp= av_tree_find(nut->syncpoints, &dummy, (void *) ff_nut_sp_pos_cmp, + NULL); nut->last_syncpoint_pos= url_ftell(bc); ret = url_open_dyn_buf(&dyn_bc); |