diff options
author | James Almer <jamrial@gmail.com> | 2021-04-08 14:16:53 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-05-06 15:26:56 -0300 |
commit | 74dce63f9ad5801018ee3d863712f652e4bf0081 (patch) | |
tree | 4736c015844d6171a7e0b6f4bf4ba62c8ea0a447 /libavformat/utils.c | |
parent | 55475b3289b3b2e0227c985e41b16d10edd6ab8c (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/utils.c')
-rw-r--r-- | libavformat/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 49bf19b2b0..6c8b974297 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2057,7 +2057,7 @@ int avformat_index_get_entries_count(const AVStream *st) return st->internal->nb_index_entries; } -const AVIndexEntry *avformat_index_get_entry(const AVStream *st, int idx) +const AVIndexEntry *avformat_index_get_entry(AVStream *st, int idx) { if (idx < 0 || idx >= st->internal->nb_index_entries) return NULL; @@ -2065,7 +2065,7 @@ const AVIndexEntry *avformat_index_get_entry(const AVStream *st, int idx) return &st->internal->index_entries[idx]; } -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) { |