summaryrefslogtreecommitdiff
path: root/libavformat/internal.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-10-09 09:22:36 +0200
committerAnton Khirnov <anton@khirnov.net>2020-10-28 14:56:20 +0100
commit456b170bd747ea7181c7305fd45278ea251f45ab (patch)
tree6b0716cd8c756135c2cdd5ca261327f193ad51c0 /libavformat/internal.h
parentcb46a6bcbcb85b3910cc0cce78399686ab8efff6 (diff)
lavf: move AVStream.{*skip_samples.*_discard_sample} to AVStreamInternal
Those are private fields, no reason to have them exposed in a public header.
Diffstat (limited to 'libavformat/internal.h')
-rw-r--r--libavformat/internal.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/libavformat/internal.h b/libavformat/internal.h
index b1112fe463..12105aa7d0 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -226,6 +226,35 @@ struct AVStreamInternal {
} *info;
/**
+ * Number of samples to skip at the start of the frame decoded from the next packet.
+ */
+ int skip_samples;
+
+ /**
+ * If not 0, the number of samples that should be skipped from the start of
+ * the stream (the samples are removed from packets with pts==0, which also
+ * assumes negative timestamps do not happen).
+ * Intended for use with formats such as mp3 with ad-hoc gapless audio
+ * support.
+ */
+ int64_t start_skip_samples;
+
+ /**
+ * If not 0, the first audio sample that should be discarded from the stream.
+ * This is broken by design (needs global sample count), but can't be
+ * avoided for broken by design formats such as mp3 with ad-hoc gapless
+ * audio support.
+ */
+ int64_t first_discard_sample;
+
+ /**
+ * The sample after last sample that is intended to be discarded after
+ * first_discard_sample. Works on frame boundaries only. Used to prevent
+ * early EOF if the gapless info is broken (considered concatenated mp3s).
+ */
+ int64_t last_discard_sample;
+
+ /**
* Number of internally decoded frames, used internally in libavformat, do not access
* its lifetime differs from info which is why it is not in that structure.
*/