summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_lavf.c
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-02-29 17:25:39 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-02-29 17:25:39 +0000
commita2fad60c7f92299aa3cf51c85e0491167287c517 (patch)
tree2c54b256ed6a2e29a8ada1795cdede036d071416 /libmpdemux/demux_lavf.c
parent18fea2aa498664c20a603d9b4fb07ffbae2056c5 (diff)
downloadmpv-a2fad60c7f92299aa3cf51c85e0491167287c517.tar.bz2
mpv-a2fad60c7f92299aa3cf51c85e0491167287c517.tar.xz
Fill sh_sub_t.lang in lavf, mkv and ogg demuxers. Use it for printing subtitle
track language. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26116 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_lavf.c')
-rw-r--r--libmpdemux/demux_lavf.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c
index c7eeae7fbb..5ab20a06e8 100644
--- a/libmpdemux/demux_lavf.c
+++ b/libmpdemux/demux_lavf.c
@@ -431,6 +431,8 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
memcpy(sh_sub->extradata, codec->extradata, codec->extradata_size);
sh_sub->extradata_len = codec->extradata_size;
}
+ if (st->language)
+ sh_sub->lang = strdup(st->language);
if (demuxer->sub->id == -1
|| (demuxer->sub->id == -2 && (dvdsub_lang && st->language[0] && !strncmp(dvdsub_lang, st->language, 3)))
|| demuxer->sub->id == priv->sub_streams) {
@@ -791,19 +793,6 @@ redo:
}
}
-/** \brief Get the language code for a subtitle track.
-
- Retrieves the language code for a subtitle track.
-
- \param demuxer The demuxer to work on
- \param track_num The subtitle track number to get the language from
-*/
-char *demux_lavf_sub_lang(demuxer_t *demuxer, int track_num)
-{
- lavf_priv_t *priv = demuxer->priv;
- return priv->avfc->streams[priv->sstreams[track_num]]->language;
-}
-
static void demux_close_lavf(demuxer_t *demuxer)
{
lavf_priv_t* priv = demuxer->priv;