summaryrefslogtreecommitdiff
path: root/libavformat/avformat.h
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-04-08 14:16:53 -0300
committerJames Almer <jamrial@gmail.com>2021-05-06 15:26:56 -0300
commit74dce63f9ad5801018ee3d863712f652e4bf0081 (patch)
tree4736c015844d6171a7e0b6f4bf4ba62c8ea0a447 /libavformat/avformat.h
parent55475b3289b3b2e0227c985e41b16d10edd6ab8c (diff)
avformat/utils: constrain the lifetime of the pointer returned by avformat_index_get_entry()
This will give us more room to improve the implementation later. Suggested-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r--libavformat/avformat.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 624d2dae2c..8ba98a0291 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -2535,10 +2535,10 @@ int avformat_index_get_entries_count(const AVStream *st);
* @return A pointer to the requested AVIndexEntry if it exists, NULL otherwise.
*
* @note The pointer returned by this function is only guaranteed to be valid
- * until any function that could alter the stream or the AVFormatContext
- * that contains it is called.
+ * until any function that takes the stream or the parent AVFormatContext
+ * as input argument is called.
*/
-const AVIndexEntry *avformat_index_get_entry(const AVStream *st, int idx);
+const AVIndexEntry *avformat_index_get_entry(AVStream *st, int idx);
/**
* Get the AVIndexEntry corresponding to the given timestamp.
@@ -2552,10 +2552,10 @@ const AVIndexEntry *avformat_index_get_entry(const AVStream *st, int idx);
* @return A pointer to the requested AVIndexEntry if it exists, NULL otherwise.
*
* @note The pointer returned by this function is only guaranteed to be valid
- * until any function that could alter the stream or the AVFormatContext
- * that contains it is called.
+ * until any function that takes the stream or the parent AVFormatContext
+ * as input argument is called.
*/
-const AVIndexEntry *avformat_index_get_entry_from_timestamp(const AVStream *st,
+const AVIndexEntry *avformat_index_get_entry_from_timestamp(AVStream *st,
int64_t wanted_timestamp,
int flags);
/**