nutenc: keep track of the written syncpoint count
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 19 Aug 2012 20:10:57 +0000 (22:10 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 26 Aug 2012 20:15:16 +0000 (22:15 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/nut.c
libavformat/nut.h

index a266d52..30c0eb6 100644 (file)
@@ -141,6 +141,8 @@ void ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts){
     Syncpoint *sp= av_mallocz(sizeof(Syncpoint));
     struct AVTreeNode *node= av_mallocz(av_tree_node_size);
 
+    nut->sp_count++;
+
     sp->pos= pos;
     sp->back_ptr= back_ptr;
     sp->ts= ts;
index 033bc08..cac6870 100644 (file)
@@ -101,6 +101,7 @@ typedef struct {
     int header_count;
     AVRational *time_base;
     struct AVTreeNode *syncpoints;
+    int sp_count;
 } NUTContext;
 
 extern const AVCodecTag ff_nut_subtitle_tags[];