[FFmpeg-devel] [PATCH] avformat/fivdec: cached keyframes before video or audio stream was created

Steven Liu lingjiujianke at gmail.com
Mon Jul 25 06:43:43 EEST 2016


2016-07-25 10:29 GMT+08:00 XinZheng Zhang <zhangxzheng at gmail.com>:

> Ping.
>
> On Thu, Jul 21, 2016 at 11:59 AM, XinZheng Zhang <zhangxzheng at gmail.com>
> wrote:
> > On Thu, Jul 21, 2016 at 5:03 AM, Moritz Barsnick <barsnick at gmx.net>
> wrote:
> >> On Thu, Jul 21, 2016 at 00:06:44 +0800, zhangxinzheng wrote:
> >>
> >>> Subject: [FFmpeg-devel] [PATCH] avformat/fivdec: cached keyframes
> before video or audio stream was created
> >>                                            ^^^ flv
> >>
> >>> There has an error when seeking in a flv file, which key frames was
> >>> sorted before video frame.
> >>> This ensures that all the key frames was cached, and add to
> >>> corresponding stream when it was created.
> >>
> >> Thanks to the grammar, I don't understand the intent of the patch.
> >> (Don't get me wrong, I'm not scorning your English, but it needs to be
> >> improved.)
> >>
> >
> > 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,
> > that may prevent keyframe index being parsed.
> >
> > This patch saves keyframe index before A/V streams are created.
> >
> > The issue was introduced since 09ae7b81ea.
> >
> > I have created a ticket #5729 with a sample attatched.
> >
> >>>  #define RESYNC_BUFFER_SIZE (1<<20)
> >>>
> >>> +
> >>> +typedef struct FLVKeyFrame {
> >>
> >> Why the extra newline?
> >>
> >
>


https://trac.ffmpeg.org/ticket/5729#comment:1


More information about the ffmpeg-devel mailing list