Commit 58f21b6c authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/hls: fix potential integer overflow

This is not a regression
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 00bd2374
......@@ -1132,7 +1132,7 @@ static int open_input(HLSContext *c, struct playlist *pls, struct segment *seg)
* should already be where want it to, but this allows e.g. local testing
* without a HTTP server. */
if (ret == 0 && seg->key_type == KEY_NONE && seg->url_offset) {
int seekret = avio_seek(pls->input, seg->url_offset, SEEK_SET);
int64_t seekret = avio_seek(pls->input, seg->url_offset, SEEK_SET);
if (seekret < 0) {
av_log(pls->parent, AV_LOG_ERROR, "Unable to seek to offset %"PRId64" of HLS segment '%s'\n", seg->url_offset, seg->url);
ret = seekret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment