From 75a010fe77c86af1b4d4dd4854955a16c366acdb Mon Sep 17 00:00:00 2001 From: Diptanshu8 Date: Wed, 15 Mar 2017 15:14:06 +0530 Subject: [PATCH] Static option _eng_ for only english subtitles has been set --- src/lib_ccx/matroska.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib_ccx/matroska.c b/src/lib_ccx/matroska.c index 292ac519..819060c1 100644 --- a/src/lib_ccx/matroska.c +++ b/src/lib_ccx/matroska.c @@ -852,8 +852,11 @@ void free_sub_track(struct matroska_sub_track* track) void matroska_save_all(struct matroska_ctx* mkv_ctx) { - for (int i = 0; i < mkv_ctx->sub_tracks_count; i++) - save_sub_track(mkv_ctx, mkv_ctx->sub_tracks[i]); + char* opt = "eng"; + for (int i = 0; i < mkv_ctx->sub_tracks_count; i++){ + if (strcmp(mkv_ctx->sub_tracks[i]->lang,opt)==0) + save_sub_track(mkv_ctx, mkv_ctx->sub_tracks[i]); + } } void matroska_free_all(struct matroska_ctx* mkv_ctx)