summaryrefslogtreecommitdiff
path: root/libavformat/nutenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-01-17 13:59:52 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-01-17 13:59:52 +0000
commit175e23e875c53fa2047f61eaad7d8262da67ac9a (patch)
tree8d38829cd60a91604977cec0eb32ce12d92d0a6f /libavformat/nutenc.c
parent8916b4b55b16fe44795aba66ca843c2b5b758fc4 (diff)
Consider initial EOR in the back_ptr calculation.
Originally committed as revision 11550 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/nutenc.c')
-rw-r--r--libavformat/nutenc.c5
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);