summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-04-04 12:47:44 +0200
committerAnton Khirnov <anton@khirnov.net>2014-10-15 06:37:43 +0000
commit7ea1b3472a61de4aa4d41b571e99418e4997ad41 (patch)
treefcf38bb7d5d1f770f1e4b8fea256fa6c45313add /libavcodec/avcodec.h
parentd565fef1b83b6c5f8afb32229260b79f67c68109 (diff)
lavc: deprecate the use of AVCodecContext.time_base for decoding
When decoding, this field holds the inverse of the framerate that can be written in the headers for some codecs. Using a field called 'time_base' for this is very misleading, as there are no timestamps associated with it. Furthermore, this field is used for a very different purpose during encoding. Add a new field, called 'framerate', to replace the use of time_base for decoding.
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 8e6c019b62..b79133f981 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1170,7 +1170,8 @@ typedef struct AVCodecContext {
* timebase should be 1/framerate and timestamp increments should be
* identically 1.
* - encoding: MUST be set by user.
- * - decoding: Set by libavcodec.
+ * - decoding: the use of this field for decoding is deprecated.
+ * Use framerate instead.
*/
AVRational time_base;
@@ -2788,6 +2789,14 @@ typedef struct AVCodecContext {
* -initial_padding.
*/
int initial_padding;
+
+ /*
+ * - decoding: For codecs that store a framerate value in the compressed
+ * bitstream, the decoder may export it here. { 0, 1} when
+ * unknown.
+ * - encoding: unused
+ */
+ AVRational framerate;
} AVCodecContext;
/**