> -----Original Message-----
> From: ffmpeg-devel <[email protected]> On Behalf Of Andreas
> Rheinhardt
> Sent: Wednesday, 22 September 2021 04:05
> To: [email protected]
> Subject: Re: [FFmpeg-devel] [PATCH v8 13/13] avfilter/graphicsub2text: Add
> new graphicsub2text filter (OCR)
>
> > +
> > +static void uninit(AVFilterContext *ctx)
> > +{
> > + SubOcrContext *s = ctx->priv;
> > +
> > + TessBaseAPIEnd(s->tapi);
> > + TessBaseAPIDelete(s->tapi);
>
> Beware: uninit is also called on init failure, so it might be that
> s->tapi is NULL or that TessBaseAPIInit4 did not succeed.
vf_ocr does it in the same way, so I assumed it to be safe.
Unfortunately there's no proper API documentation for tesseract.
[..] Will apply the stripped notes - thank you!
> > + if (frame->num_subtitle_areas > 0 && frame->subtitle_end_time >=
> 30000) {
>
> Where does this number come from?
dvbsubdec uses this as value when it can't determine the end display
time. Others are setting it to UINT64_MAX.
This is the indication to know that the subtitles do not have a
display duration and we need to wait for the next one instead.
softworkz
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".