Commit d4936d28 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/asfdec: Use 64bit ret to avoid overflow

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 62e95757
...@@ -1489,7 +1489,7 @@ static int asf_build_simple_index(AVFormatContext *s, int stream_index) ...@@ -1489,7 +1489,7 @@ static int asf_build_simple_index(AVFormatContext *s, int stream_index)
ff_asf_guid g; ff_asf_guid g;
ASFContext *asf = s->priv_data; ASFContext *asf = s->priv_data;
int64_t current_pos = avio_tell(s->pb); int64_t current_pos = avio_tell(s->pb);
int ret = 0; int64_t ret;
if((ret = avio_seek(s->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET)) < 0) { if((ret = avio_seek(s->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET)) < 0) {
return ret; return ret;
...@@ -1559,7 +1559,7 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, ...@@ -1559,7 +1559,7 @@ static int asf_read_seek(AVFormatContext *s, int stream_index,
/* Try using the protocol's read_seek if available */ /* Try using the protocol's read_seek if available */
if (s->pb) { if (s->pb) {
int ret = avio_seek_time(s->pb, stream_index, pts, flags); int64_t ret = avio_seek_time(s->pb, stream_index, pts, flags);
if (ret >= 0) if (ret >= 0)
asf_reset_header(s); asf_reset_header(s);
if (ret != AVERROR(ENOSYS)) if (ret != AVERROR(ENOSYS))
......
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