Skip to content
Browse files

[FIX] Fix several memory leaks using Leptonica API for hardcoded subt…

…itle extraction (#1105)

* Rewritten Tesseract and Leptonica imports

* Fixed memory leak extracting hardcoded subtitles

* Minor code enhancements and cleanups

* Fixed memory leak using function pixSauvolaBinarize

* Updated changelog
  • Loading branch information...
dbarelop authored and cfsmp3 committed Sep 12, 2019
1 parent 8a9d924 commit 7598225ee1dc2e66872051c746f0705fdc87101d
@@ -1,6 +1,7 @@
0.89 (TBD)
- Fix: ccx_demuxer_mxf.c: Parse framerate from MXF captions to fix caption timings.
- Fix: hardsubx_decoder.c: Fix memory leaks using Leptonica API.
- Fix: linux/ added some sources to enable rpms to be created.

0.88 (2019-05-21)
@@ -1,7 +1,7 @@
#include <tesseract/capi.h>
#include <leptonica/allheaders.h>
#include "hardsubx.h"
#include "tesseract/capi.h"
#include "allheaders.h"
#include "ocr.h"
#include "utility.h"

@@ -9,8 +9,8 @@
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
#include "allheaders.h"
#include "tesseract/capi.h"
#include <leptonica/allheaders.h>
#include <tesseract/capi.h>

enum hardsubx_color_type
@@ -86,9 +86,9 @@ void _dinit_hardsubx(struct lib_hardsubx_ctx **ctx);
int hardsubx_process_data(struct lib_hardsubx_ctx *ctx);

int hardsubx_process_frames_linear(struct lib_hardsubx_ctx *ctx, struct encoder_ctx *enc_ctx);
void hardsubx_process_frames_linear(struct lib_hardsubx_ctx *ctx, struct encoder_ctx *enc_ctx);
int hardsubx_process_frames_tickertext(struct lib_hardsubx_ctx *ctx, struct encoder_ctx *enc_ctx);
int hardsubx_process_frames_binary(struct lib_hardsubx_ctx *ctx);
void hardsubx_process_frames_binary(struct lib_hardsubx_ctx *ctx);
char* _process_frame_white_basic(struct lib_hardsubx_ctx *ctx, AVFrame *frame, int width, int height, int index);
char *_process_frame_color_basic(struct lib_hardsubx_ctx *ctx, AVFrame *frame, int width, int height, int index);
void _display_frame(struct lib_hardsubx_ctx *ctx, AVFrame *frame, int width, int height, int timestamp);
@@ -7,7 +7,7 @@
#include <libavformat/avformat.h>
#include <libavutil/imgutils.h>
#include <libswscale/swscale.h>
#include "allheaders.h"
#include <leptonica/allheaders.h>
#include "hardsubx.h"

char *get_ocr_text_simple(struct lib_hardsubx_ctx *ctx, PIX *image)

0 comments on commit 7598225

Please sign in to comment.
You can’t perform that action at this time.