summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-17 18:34:11 +0200
committerwm4 <wm4@nowhere>2013-04-20 23:28:27 +0200
commitc6b03be894750b4939e79c4a51c11ad0a63589d5 (patch)
treeda98d6ef55c4045b1b0c5785f2dc8e4cfa01dafb /sub
parent018530cb7490600bf1f14bfe7cc93e18321ddce7 (diff)
downloadmpv-c6b03be894750b4939e79c4a51c11ad0a63589d5.tar.bz2
mpv-c6b03be894750b4939e79c4a51c11ad0a63589d5.tar.xz
core: display subtitle codec in track listing
Also switch the subrip and subviewer names, which obviously have been confused.
Diffstat (limited to 'sub')
-rw-r--r--sub/subreader.c5
-rw-r--r--sub/subreader.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/sub/subreader.c b/sub/subreader.c
index bdcc79a64a..23da4c79e5 100644
--- a/sub/subreader.c
+++ b/sub/subreader.c
@@ -1324,8 +1324,8 @@ sub_data* sub_read_file(char *filename, float fps, struct MPOpts *opts)
static const struct subreader sr[]=
{
{ sub_read_line_microdvd, NULL, "microdvd" },
- { sub_read_line_subrip, NULL, "subrip" },
- { sub_read_line_subviewer, NULL, "subviewer" },
+ { sub_read_line_subrip, NULL, "subviewer" },
+ { sub_read_line_subviewer, NULL, "subrip" },
{ sub_read_line_sami, NULL, "sami" },
{ sub_read_line_vplayer, NULL, "vplayer" },
{ sub_read_line_rt, NULL, "rt" },
@@ -1684,6 +1684,7 @@ if ((suboverlap_enabled == 2) ||
if (return_sub == NULL) return NULL;
subt_data = talloc_zero(NULL, sub_data);
talloc_set_destructor(subt_data, sub_destroy);
+ subt_data->codec = srp->name;
subt_data->filename = strdup(filename);
subt_data->sub_uses_time = uses_time;
subt_data->sub_num = sub_num;
diff --git a/sub/subreader.h b/sub/subreader.h
index 4584f2366a..7a2316bdf1 100644
--- a/sub/subreader.h
+++ b/sub/subreader.h
@@ -72,6 +72,7 @@ typedef struct subtitle {
} subtitle;
typedef struct sub_data {
+ const char *codec;
subtitle *subtitles;
char *filename;
int sub_uses_time;