diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-02 11:57:53 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-13 16:31:15 -0400 |
commit | b631fba936d2b353f3c2a76f746bc40a1a193b75 (patch) | |
tree | 01819d1a52fe9b38a32385af0f6bca9f8b01fec9 /libavformat/utils.c | |
parent | 050e20aee653bf17c0e8d0317b50cfe0a7142366 (diff) | |
download | ffmpeg-b631fba936d2b353f3c2a76f746bc40a1a193b75.tar.gz |
avformat: add AVInputFormat flag AVFMT_NO_BYTE_SEEK.
This will prevent seeking by bytes for formats that cannot handle this.
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index fc17f18464..3115723668 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -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); } |