flv: Only parse keyframe index when the underlaying protocol allows seeking as we...
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 8 Apr 2011 22:03:01 +0000 (00:03 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 9 Apr 2011 01:23:49 +0000 (03:23 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/flvdec.c

index 104fc42..d06cfcc 100644 (file)
@@ -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;