[FFmpeg-cvslog] flv: Only parse keyframe index when the underlaying protocol allows seeking as we need to seek to read the index

Michael Niedermayer git at videolan.org
Sat Apr 9 03:49:48 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Apr  9 00:03:01 2011 +0200| [c0577ceb5569a5f02a9a405f9d8bc9b3ba66fad4] | committer: Michael Niedermayer

flv: Only parse keyframe index when the underlaying protocol allows seeking as we need to seek to read the index
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c0577ceb5569a5f02a9a405f9d8bc9b3ba66fad4
---

 libavformat/flvdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 104fc42..d06cfcc 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -203,7 +203,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst
         case AMF_DATA_TYPE_OBJECT: {
             unsigned int keylen;
 
-            if (key && !strcmp(KEYFRAMES_TAG, key) && depth == 1)
+            if (ioc->seekable && key && !strcmp(KEYFRAMES_TAG, key) && depth == 1)
                 if (parse_keyframes_index(s, ioc, vstream, max_pos) < 0)
                     return -1;
 



More information about the ffmpeg-cvslog mailing list