Mercurial > libavformat.hg
changeset 2939:7e246e837176 libavformat
Consider initial EOR in the back_ptr calculation.
author | michael |
---|---|
date | Thu, 17 Jan 2008 13:59:52 +0000 |
parents | ae1f1ef873ef |
children | 60b898a8e4d0 |
files | nutenc.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/nutenc.c Thu Jan 17 00:12:04 2008 +0000 +++ b/nutenc.c Thu Jan 17 13:59:52 2008 +0000 @@ -476,9 +476,10 @@ for(i=0; i<s->nb_streams; i++){ AVStream *st= s->streams[i]; int index= av_index_search_timestamp(st, pkt->dts, AVSEEK_FLAG_BACKWARD); - if(index<0) dummy.pos=0; - else dummy.pos= FFMIN(dummy.pos, st->index_entries[index].pos); + if(index>=0) dummy.pos= FFMIN(dummy.pos, st->index_entries[index].pos); } + if(dummy.pos == INT64_MAX) + dummy.pos= 0; sp= av_tree_find(nut->syncpoints, &dummy, ff_nut_sp_pos_cmp, NULL); nut->last_syncpoint_pos= url_ftell(bc);