On Sun, Jan 24, 2021 at 9:38 PM James Almer <jamr...@gmail.com> wrote:
>
> On 1/24/2021 10:00 AM, Linjie Fu wrote:
> > From: Linjie Fu <linjie.fulin...@alibaba-inc.com>
> >
> > Regression since 87f0c8280.
> >
> > If the extradata of a stream could not be extracted correctly,
> > codec_info_nb_frames would remain zero, while st->event_flag would still
> > be marked as AVSTREAM_EVENT_FLAG_NEW_PACKETS since it's a new packet
> > indeed.
> >
> > The two expressions could be different in this case, hence restore to
> > calculate the correct score.
> >
> > Fix #9029.
>
> codec_info_nb_frames is not public, which is why its usage was removed,
> so this patch is not ok.
Okay, thx.

> A proper fix would perhaps be to reset event_flags after this, as its
> API says it should. Can you try that and see if it works?
>
Yes it works,  and I've tried this before I sent this patch out.

However, what makes me hesitant is the definition of
AVSTREAM_EVENT_FLAG_NEW_PACKETS , which says this flag indicates "new
packets for this stream were read from the file".
IIRC the behaviour in this case matches the definition well, hence I
didn't  reset event_flags to zero at first.

Will send it out for discussion as well, thx.

- linjie
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to