diff options
author | Igor Derzhavin <igor.derzhavin@gmail.com> | 2015-06-10 14:56:02 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-10 16:22:11 +0200 |
commit | 203f9c8ff050201d72a04e9d6468b477de7e6944 (patch) | |
tree | 527b8d2c8a46341c12f0e9b36da168eda1b30df3 /libavformat | |
parent | d6d98237ed01aec7d79e7724d43004c8b9c8d383 (diff) | |
download | ffmpeg-203f9c8ff050201d72a04e9d6468b477de7e6944.tar.gz |
libavformat/flvdec.c: don't build index_entries for input stream if AVIOContext is not seekable
Signed-off-by: Igor Derzhavin <igor.derzhavin@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/flvdec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 940d4dda45..aea26c7f5c 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -896,8 +896,9 @@ skip: } av_log(s, AV_LOG_TRACE, "%d %X %d \n", stream_type, flags, st->discard); - if ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY || - stream_type == FLV_STREAM_TYPE_AUDIO) + if (s->pb->seekable && + ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY || + stream_type == FLV_STREAM_TYPE_AUDIO)) av_add_index_entry(st, pos, dts, size, 0, AVINDEX_KEYFRAME); if ( (st->discard >= AVDISCARD_NONKEY && !((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY || (stream_type == FLV_STREAM_TYPE_AUDIO))) |