summaryrefslogtreecommitdiff
path: root/libavformat/oggdec.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/oggdec.h')
-rw-r--r--libavformat/oggdec.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/libavformat/oggdec.h b/libavformat/oggdec.h
index 807ac4a316..4a2b6ddee8 100644
--- a/libavformat/oggdec.h
+++ b/libavformat/oggdec.h
@@ -81,7 +81,12 @@ struct ogg_stream {
int incomplete; ///< whether we're expecting a continuation in the next page
int page_end; ///< current packet is the last one completed in the page
int keyframe_seek;
+ int got_start;
+ int got_data; ///< 1 if the stream got some data (non-initial packets), 0 otherwise
int nb_header; ///< set to the number of parsed headers
+ int end_trimming; ///< set the number of packets to drop from the end
+ uint8_t *new_metadata;
+ unsigned int new_metadata_size;
void *private;
};
@@ -98,6 +103,7 @@ struct ogg {
int nstreams;
int headers;
int curidx;
+ int64_t page_pos; ///< file offset of the current page
struct ogg_state *state;
};
@@ -105,9 +111,10 @@ struct ogg {
#define OGG_FLAG_BOS 2
#define OGG_FLAG_EOS 4
-#define OGG_NOGRANULE_VALUE -1ull
+#define OGG_NOGRANULE_VALUE (-1ull)
extern const struct ogg_codec ff_celt_codec;
+extern const struct ogg_codec ff_daala_codec;
extern const struct ogg_codec ff_dirac_codec;
extern const struct ogg_codec ff_flac_codec;
extern const struct ogg_codec ff_ogm_audio_codec;
@@ -155,6 +162,11 @@ ogg_gptopts (AVFormatContext * s, int i, uint64_t gp, int64_t *dts)
if (dts)
*dts = pts;
}
+ if (pts > INT64_MAX && pts != AV_NOPTS_VALUE) {
+ // The return type is unsigned, we thus cannot return negative pts
+ av_log(s, AV_LOG_ERROR, "invalid pts %"PRId64"\n", pts);
+ pts = AV_NOPTS_VALUE;
+ }
return pts;
}