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:
wm4 2013-05-04 02:09:47 +02:00
parent b8fce1217c
commit 6a0421295e
1 changed files with 4 additions and 1 deletions

View File

@ -287,6 +287,8 @@ success:
static bool matches_avinputformat_name(struct lavf_priv *priv,
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;
while (1) {
const char *next = strchr(avifname, ',');
@ -425,7 +427,8 @@ static void handle_stream(demuxer_t *demuxer, int i)
if (st->disposition & AV_DISPOSITION_DEFAULT)
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;
AVDictionaryEntry *title = av_dict_get(st->metadata, "title", NULL, 0);
if (title && title->value)