summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-02-09 15:15:28 +0100
committerwm4 <wm4@nowhere>2013-02-10 17:25:57 +0100
commita0987186b91680df473a7273a1eec130d0dd1a60 (patch)
tree4f8d450f381333f5a52a1b9843bce8b1bb012ba8 /core
parent4d016a92c876e98797c362d05468bf27d5a85414 (diff)
downloadmpv-a0987186b91680df473a7273a1eec130d0dd1a60.tar.bz2
mpv-a0987186b91680df473a7273a1eec130d0dd1a60.tar.xz
demux_lavf: remove code duplication
Also move the lang field into the general stream header. (SH_COMMON is an old hack to "share" code between audio/video/sub headers.) There should be no functional changes, other than not printing stream info in verbose mode or with slave mode. (The frontend already prints stream info, and this is just a leftover when individual demuxers did this, and slave mode remains broken.)
Diffstat (limited to 'core')
-rw-r--r--core/mplayer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/mplayer.c b/core/mplayer.c
index baee6482b1..dbcebf9f4e 100644
--- a/core/mplayer.c
+++ b/core/mplayer.c
@@ -288,7 +288,7 @@ static void print_stream(struct MPContext *mpctx, struct track *t, int id)
const char *langopt = "?";
switch (t->type) {
case STREAM_VIDEO:
- tname = "Video"; selopt = "vid"; langopt = "vlang";
+ tname = "Video"; selopt = "vid"; langopt = NULL;
break;
case STREAM_AUDIO:
tname = "Audio"; selopt = "aid"; langopt = "alang";
@@ -300,7 +300,7 @@ static void print_stream(struct MPContext *mpctx, struct track *t, int id)
mp_msg(MSGT_CPLAYER, MSGL_INFO, "[stream] %-5s %3s",
tname, mpctx->current_track[t->type] == t ? "(+)" : "");
mp_msg(MSGT_CPLAYER, MSGL_INFO, " --%s=%d", selopt, t->user_tid);
- if (t->lang)
+ if (t->lang && langopt)
mp_msg(MSGT_CPLAYER, MSGL_INFO, " --%s=%s", langopt, t->lang);
if (t->default_track)
mp_msg(MSGT_CPLAYER, MSGL_INFO, " (*)");
@@ -877,7 +877,7 @@ static struct track *add_stream_track(struct MPContext *mpctx,
.title = stream->title,
.default_track = stream->default_track,
.attached_picture = stream->attached_picture,
- .lang = stream->common_header->lang,
+ .lang = stream->lang,
.under_timeline = under_timeline,
.demuxer = stream->demuxer,
.stream = stream,