summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-01-12 20:03:17 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2012-02-20 15:08:40 -0500
commite9cda853511d7c5a8fa16da4f99cf8ead86bf658 (patch)
tree1bbd4917b41b24a84c3419aab35c511be508233c /libavcodec
parent0b42a9388c98c8669811d4e7e5da7240e6707a41 (diff)
avcodec: add duration field to AVCodecParserContext
This will allow parsers to export the duration of the current frame being output, if known, instead of using AVCodecContext.frame_size.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avcodec.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 51b956ba81..7128a83148 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3994,6 +3994,13 @@ typedef struct AVCodecParserContext {
* Previous frame byte position.
*/
int64_t last_pos;
+
+ /**
+ * Duration of the current frame.
+ * For audio, this is in units of 1 / AVCodecContext.sample_rate.
+ * For all other types, this is in units of AVCodecContext.time_base.
+ */
+ int duration;
} AVCodecParserContext;
typedef struct AVCodecParser {