> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-boun...@ffmpeg.org> On Behalf Of Andreas
> Rheinhardt
> Sent: Wednesday, 22 September 2021 04:05
> To: ffmpeg-devel@ffmpeg.org
> 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
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