]> git.sesse.net Git - ffmpeg/commitdiff
Rename last_frame_offset to next_frame_offset.
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 2 Jun 2008 03:10:00 +0000 (03:10 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 2 Jun 2008 03:10:00 +0000 (03:10 +0000)
(it was and is the next not the last)

Originally committed as revision 13615 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/avcodec.h
libavcodec/parser.c

index b14c1a940c1c4f3fa74efa01ab3a9df89f3f416f..87d344cb9f1009b1a78ac02236b93df1f174f1f3 100644 (file)
@@ -2822,7 +2822,7 @@ typedef struct AVCodecParserContext {
     int64_t frame_offset; /* offset of the current frame */
     int64_t cur_offset; /* current offset
                            (incremented by each av_parser_parse()) */
-    int64_t last_frame_offset; /* offset of the last frame */
+    int64_t next_frame_offset; /* offset of the next frame */
     /* video info */
     int pict_type; /* XXX: Put it back in AVCodecContext. */
     int repeat_pict; /* XXX: Put it back in AVCodecContext. */
index e5a4b3506119fa31f5076e8a6b22cd7eb06cab1a..00356b10e5668c1fff3fd4ce29b17076f29d7153 100644 (file)
@@ -130,12 +130,12 @@ int av_parser_parse(AVCodecParserContext *s,
         s->dts= s->pts= AV_NOPTS_VALUE;
         s->offset= 0;
         for(i = 0; i < AV_PARSER_PTS_NB; i++) {
-            if (   s->last_frame_offset >= s->cur_frame_offset[i]
+            if (   s->next_frame_offset >= s->cur_frame_offset[i]
                 &&(s->     frame_offset <  s->cur_frame_offset[i] || !s->frame_offset)
-                && s->last_frame_offset <  s->cur_frame_end[i]){
+                && s->next_frame_offset <  s->cur_frame_end[i]){
                 s->dts= s->cur_frame_dts[i];
                 s->pts= s->cur_frame_pts[i];
-                s->offset = s->last_frame_offset - s->cur_frame_offset[i];
+                s->offset = s->next_frame_offset - s->cur_frame_offset[i];
             }
         }
     }
@@ -146,10 +146,10 @@ int av_parser_parse(AVCodecParserContext *s,
     /* update the file pointer */
     if (*poutbuf_size) {
         /* fill the data for the current frame */
-        s->frame_offset = s->last_frame_offset;
+        s->frame_offset = s->next_frame_offset;
 
         /* offset of the next frame */
-        s->last_frame_offset = s->cur_offset + index;
+        s->next_frame_offset = s->cur_offset + index;
             s->fetch_timestamp=1;
     }
     if (index < 0)