From 6194d7e56454897b9c5d9d52e82376b2a6e6b85c Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 24 Jan 2018 08:02:25 +0100 Subject: avformat, hls: add a flag to signal unavailability of seeking The seek function can just return an error if seeking is unavailable, but often this is too late. Add a flag that signals that the stream is unseekable, and use it in HLS. --- libavformat/avformat.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libavformat/avformat.h') diff --git a/libavformat/avformat.h b/libavformat/avformat.h index e5740be2b4..60ab9fbc80 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1275,6 +1275,11 @@ typedef struct AVProgram { #define AVFMTCTX_NOHEADER 0x0001 /**< signal that no header is present (streams are added dynamically) */ +#define AVFMTCTX_UNSEEKABLE 0x0002 /**< signal that the stream is definitely + not seekable, and attempts to call the + seek function will fail. For some + network protocols (e.g. HLS), this can + change dynamically at runtime. */ typedef struct AVChapter { int id; ///< unique ID to identify the chapter -- cgit v1.2.3