diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-01-17 13:59:52 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-01-17 13:59:52 +0000 |
commit | 175e23e875c53fa2047f61eaad7d8262da67ac9a (patch) | |
tree | 8d38829cd60a91604977cec0eb32ce12d92d0a6f /libavformat | |
parent | 8916b4b55b16fe44795aba66ca843c2b5b758fc4 (diff) | |
download | ffmpeg-175e23e875c53fa2047f61eaad7d8262da67ac9a.tar.gz |
Consider initial EOR in the back_ptr calculation.
Originally committed as revision 11550 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/nutenc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index a6be630767..8d05377740 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -476,9 +476,10 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt){ 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); |