mirror of https://github.com/mpv-player/mpv
demux_lavf: use demuxer ID for transport streams
Might help mapping tracks correctly to stream_bluray, fixing the issue with the track language not being reported.
This commit is contained in:
parent
b8fce1217c
commit
6a0421295e
|
@ -287,6 +287,8 @@ success:
|
||||||
static bool matches_avinputformat_name(struct lavf_priv *priv,
|
static bool matches_avinputformat_name(struct lavf_priv *priv,
|
||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
|
// At least mp4 has name="mov,mp4,m4a,3gp,3g2,mj2", so we split the name
|
||||||
|
// on "," in general.
|
||||||
const char *avifname = priv->avif->name;
|
const char *avifname = priv->avif->name;
|
||||||
while (1) {
|
while (1) {
|
||||||
const char *next = strchr(avifname, ',');
|
const char *next = strchr(avifname, ',');
|
||||||
|
@ -425,7 +427,8 @@ static void handle_stream(demuxer_t *demuxer, int i)
|
||||||
|
|
||||||
if (st->disposition & AV_DISPOSITION_DEFAULT)
|
if (st->disposition & AV_DISPOSITION_DEFAULT)
|
||||||
sh->default_track = 1;
|
sh->default_track = 1;
|
||||||
if (matches_avinputformat_name(priv, "mpeg"))
|
if (matches_avinputformat_name(priv, "mpeg") ||
|
||||||
|
matches_avinputformat_name(priv, "mpegts"))
|
||||||
sh->demuxer_id = st->id;
|
sh->demuxer_id = st->id;
|
||||||
AVDictionaryEntry *title = av_dict_get(st->metadata, "title", NULL, 0);
|
AVDictionaryEntry *title = av_dict_get(st->metadata, "title", NULL, 0);
|
||||||
if (title && title->value)
|
if (title && title->value)
|
||||||
|
|
Loading…
Reference in New Issue