]> git.sesse.net Git - ffmpeg/commitdiff
lavc: clarify the meaning of AVCodecContext.frame_number.
authorAnton Khirnov <anton@khirnov.net>
Thu, 1 Mar 2012 11:25:50 +0000 (12:25 +0100)
committerAnton Khirnov <anton@khirnov.net>
Sat, 3 Mar 2012 05:31:41 +0000 (06:31 +0100)
libavcodec/avcodec.h

index 798cac66960a60c1ccdaf34f71d272f2be9ee73a..19f114f78da2084ffdd8c0c1fd17073002cecdf9 100644 (file)
@@ -1972,7 +1972,17 @@ typedef struct AVCodecContext {
      * Samples per packet, initialized when calling 'init'.
      */
     int frame_size;
-    int frame_number;   ///< audio or video frame number
+
+    /**
+     * Frame counter, set by libavcodec.
+     *
+     * - decoding: total number of frames returned from the decoder so far.
+     * - encoding: total number of frames passed to the encoder so far.
+     *
+     *   @note the counter is not incremented if encoding/decoding resulted in
+     *   an error.
+     */
+    int frame_number;
 
     /**
      * number of bytes per packet if constant and known or 0