[FFmpeg-trac] #5729(avformat:new): FLV key frame index at start may be skipped (was: Failure of seeking in FLVs)

FFmpeg trac at avcodec.org
Mon Jul 25 07:23:09 EEST 2016


#5729: FLV key frame index at start may be skipped
------------------------------------+------------------------------------
             Reporter:  snorlaxzxz  |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  flv         |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------
Changes (by snorlaxzxz):

 * cc: zhangxzheng@… (added)


Comment:

 Replying to [comment:1 cehoyos]:
 > Seeking works fine here for the uploaded sample.
 > Please provide the command line that allows to reproduce the issue
 together with the complete, uncut console output.


 The issue was introduced since 09ae7b81ea. It may slow down seeking in
 online streams.

 In flvdec.c 420
 case AMF_DATA_TYPE_OBJECT:
     if ((vstream || astream) && key &&
         ioc->seekable &&
         !strcmp(KEYFRAMES_TAG, key) && depth == 1)
         if (parse_keyframes_index(s, ioc, vstream ? vstream : astream,
                                   max_pos) < 0)

 If the first packet we got is object, both vstream and astream are NULL,
 which may prevent keyframe index being parsed.

 Eg. [meta:keyframe index]-[a]-[v]-[a]-[v]

 I have sent a patch to ML
 `avformat/fivdec: cached keyframes before video or audio stream was
 created`

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5729#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list