mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-29 12:26:20 +08:00
Do not set pos to an error value.
Patch by Howard Chu, hyc highlandsun com Originally committed as revision 22853 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:

committed by
Carl Eugen Hoyos

parent
f01210a691
commit
c007c687c9
@ -743,8 +743,13 @@ int64_t av_url_read_fseek(ByteIOContext *s, int stream_index,
|
|||||||
return AVERROR(ENOSYS);
|
return AVERROR(ENOSYS);
|
||||||
ret = s->read_seek(h, stream_index, timestamp, flags);
|
ret = s->read_seek(h, stream_index, timestamp, flags);
|
||||||
if(ret >= 0) {
|
if(ret >= 0) {
|
||||||
|
int64_t pos;
|
||||||
s->buf_ptr = s->buf_end; // Flush buffer
|
s->buf_ptr = s->buf_end; // Flush buffer
|
||||||
s->pos = s->seek(h, 0, SEEK_CUR);
|
pos = s->seek(h, 0, SEEK_CUR);
|
||||||
|
if (pos >= 0)
|
||||||
|
s->pos = pos;
|
||||||
|
else if (pos != AVERROR(ENOSYS))
|
||||||
|
ret = pos;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user