avformat: add AVInputFormat flag AVFMT_NO_BYTE_SEEK.

This will prevent seeking by bytes for formats that cannot handle this.
This commit is contained in:
Justin Ruggles
2011-10-02 11:57:53 -04:00
parent 050e20aee6
commit b631fba936
4 changed files with 8 additions and 2 deletions

View File

@@ -1750,6 +1750,8 @@ int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int f
AVStream *st;
if (flags & AVSEEK_FLAG_BYTE) {
if (s->iformat->flags & AVFMT_NO_BYTE_SEEK)
return -1;
ff_read_frame_flush(s);
return seek_frame_byte(s, stream_index, timestamp, flags);
}