[FFmpeg-cvslog] r11550 - in trunk: libavformat/nutenc.c tests/libav.regression.ref tests/seek.regression.ref

michael subversion
Thu Jan 17 14:59:53 CET 2008


Author: michael
Date: Thu Jan 17 14:59:52 2008
New Revision: 11550

Log:
Consider initial EOR in the back_ptr calculation.


Modified:
   trunk/libavformat/nutenc.c
   trunk/tests/libav.regression.ref
   trunk/tests/seek.regression.ref

Modified: trunk/libavformat/nutenc.c
==============================================================================
--- trunk/libavformat/nutenc.c	(original)
+++ trunk/libavformat/nutenc.c	Thu Jan 17 14:59:52 2008
@@ -476,9 +476,10 @@ static int write_packet(AVFormatContext 
         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);

Modified: trunk/tests/libav.regression.ref
==============================================================================
--- trunk/tests/libav.regression.ref	(original)
+++ trunk/tests/libav.regression.ref	Thu Jan 17 14:59:52 2008
@@ -31,8 +31,8 @@ f8ad5bd78f4d012a8ce9570aa395ac54 *./test
 2ba41cf880aa5cb87e8a08fdb735398d *./tests/data/b-libav.gxf
 814640 ./tests/data/b-libav.gxf
 ./tests/data/b-libav.gxf CRC=0xa376c09e
-1df60f0160da3aa6502e886591ca95c0 *./tests/data/b-libav.nut
-331017 ./tests/data/b-libav.nut
+b54fe5ee2983506550b4433b63845daf *./tests/data/b-libav.nut
+331018 ./tests/data/b-libav.nut
 ./tests/data/b-libav.nut CRC=0x400c29e9
 43238b15f1012aa27536c2be20bb2383 *./tests/data/b-libav.mkv
 329854 ./tests/data/b-libav.mkv

Modified: trunk/tests/seek.regression.ref
==============================================================================
--- trunk/tests/seek.regression.ref	(original)
+++ trunk/tests/seek.regression.ref	Thu Jan 17 14:59:52 2008
@@ -3127,55 +3127,55 @@ ret: 0 st: 1 dts:0.500000 pts:0.500000 p
 tests/data/b-libav.nut
 ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:248 size:28088 flags:1
 ret: 0 st:-1 ts:-1.000000 flags:0
-ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:28361 size:208 flags:1
+ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:248 size:28088 flags:1
 ret: 0 st:-1 ts:1.894167 flags:1
-ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302254 size:27897 flags:1
+ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302255 size:27897 flags:1
 ret: 0 st: 0 ts:0.800000 flags:0
-ret: 0 st: 0 dts:0.480000 pts:0.480000 pos:149740 size:27412 flags:1
+ret: 0 st: 0 dts:0.480000 pts:0.480000 pos:149741 size:27412 flags:1
 ret: 0 st: 0 ts:-0.320000 flags:1
 ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:248 size:28088 flags:1
 ret: 0 st: 1 ts:2.586122 flags:0
-ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302254 size:27897 flags:1
+ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302255 size:27897 flags:1
 ret: 0 st: 1 ts:1.462857 flags:1
-ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302254 size:27897 flags:1
+ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302255 size:27897 flags:1
 ret: 0 st:-1 ts:0.365002 flags:0
 ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:248 size:28088 flags:1
 ret: 0 st:-1 ts:-0.740831 flags:1
 ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:248 size:28088 flags:1
 ret: 0 st: 0 ts:2.160000 flags:0
-ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302254 size:27897 flags:1
+ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302255 size:27897 flags:1
 ret: 0 st: 0 ts:1.040000 flags:1
-ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302254 size:27897 flags:1
+ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302255 size:27897 flags:1
 ret: 0 st: 1 ts:-0.052245 flags:0
-ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:28361 size:208 flags:1
+ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:248 size:28088 flags:1
 ret: 0 st: 1 ts:2.847347 flags:1
-ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302254 size:27897 flags:1
+ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302255 size:27897 flags:1
 ret: 0 st:-1 ts:1.730004 flags:0
-ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302254 size:27897 flags:1
+ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302255 size:27897 flags:1
 ret: 0 st:-1 ts:0.624171 flags:1
-ret: 0 st: 1 dts:0.417959 pts:0.417959 pos:138863 size:209 flags:1
+ret: 0 st: 1 dts:0.417959 pts:0.417959 pos:138864 size:209 flags:1
 ret: 0 st: 0 ts:-0.480000 flags:0
-ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:28361 size:208 flags:1
+ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:248 size:28088 flags:1
 ret: 0 st: 0 ts:2.400000 flags:1
-ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302254 size:27897 flags:1
+ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302255 size:27897 flags:1
 ret: 0 st: 1 ts:1.306122 flags:0
-ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302254 size:27897 flags:1
+ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302255 size:27897 flags:1
 ret: 0 st: 1 ts:0.208980 flags:1
 ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:248 size:28088 flags:1
 ret: 0 st:-1 ts:-0.904994 flags:0
-ret: 0 st: 1 dts:0.000000 pts:0.000000 pos:28361 size:208 flags:1
+ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:248 size:28088 flags:1
 ret: 0 st:-1 ts:1.989173 flags:1
-ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302254 size:27897 flags:1
+ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302255 size:27897 flags:1
 ret: 0 st: 0 ts:0.880000 flags:0
-ret: 0 st: 0 dts:0.480000 pts:0.480000 pos:149740 size:27412 flags:1
+ret: 0 st: 0 dts:0.480000 pts:0.480000 pos:149741 size:27412 flags:1
 ret: 0 st: 0 ts:-0.240000 flags:1
 ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:248 size:28088 flags:1
 ret: 0 st: 1 ts:2.664490 flags:0
-ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302254 size:27897 flags:1
+ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302255 size:27897 flags:1
 ret: 0 st: 1 ts:1.567347 flags:1
-ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302254 size:27897 flags:1
+ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:302255 size:27897 flags:1
 ret: 0 st:-1 ts:0.460008 flags:0
-ret: 0 st: 1 dts:0.470204 pts:0.470204 pos:149505 size:209 flags:1
+ret: 0 st: 1 dts:0.470204 pts:0.470204 pos:149506 size:209 flags:1
 ret: 0 st:-1 ts:-0.645825 flags:1
 ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:248 size:28088 flags:1
 ----------------




More information about the ffmpeg-cvslog mailing list