mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-24 20:01:42 +00:00
handle no language found
This commit is contained in:
parent
2c9faa70ea
commit
94675b2dac
@ -435,6 +435,11 @@ void* dvbsub_init_decoder(struct dvb_config* cfg)
|
||||
|
||||
#ifdef ENABLE_OCR
|
||||
ctx->ocr_ctx = init_ocr(ctx->lang_index);
|
||||
if(!ctx->ocr_ctx)
|
||||
{
|
||||
freep(&ctx);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
ctx->version = -1;
|
||||
|
||||
|
@ -67,7 +67,7 @@ static void delete_ocr (struct ocrCtx* ctx)
|
||||
{
|
||||
TessBaseAPIEnd(ctx->api);
|
||||
TessBaseAPIDelete(ctx->api);
|
||||
freep(ctx);
|
||||
freep(&ctx);
|
||||
}
|
||||
void* init_ocr(int lang_index)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user