summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmpdemux/demuxer.h2
-rw-r--r--mplayer.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h
index 8c04c9dad6..62316c0ef0 100644
--- a/libmpdemux/demuxer.h
+++ b/libmpdemux/demuxer.h
@@ -120,8 +120,6 @@ typedef struct demux_stream {
off_t dpos; // position in the demuxed stream
int pack_no; // serial number of packet
bool keyframe; // keyframe flag of current packet
- int non_interleaved; // 1 if this stream is not properly interleaved,
- // so e.g. subtitle handling must do explicit reads.
//---------------
int packs; // number of packets in buffer
int bytes; // total bytes of packets in buffer
diff --git a/mplayer.c b/mplayer.c
index 08ba04a0f5..450beb58f9 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1752,7 +1752,8 @@ static void update_subtitles(struct MPContext *mpctx, double refpts_tl)
spudec_assemble(vo_spudec, packet, len, timestamp);
}
} else if (d_sub && (is_text_sub(type) || (sh_sub && sh_sub->active))) {
- if (d_sub->non_interleaved)
+ bool non_interleaved = track->is_external; // if demuxing subs only
+ if (non_interleaved)
ds_get_next_pts(d_sub);
while (d_sub->first) {
@@ -1762,7 +1763,7 @@ static void update_subtitles(struct MPContext *mpctx, double refpts_tl)
if (!opts->ass_enabled || !is_text_sub(type))
break;
// Try to avoid demuxing whole file at once
- if (d_sub->non_interleaved && subpts_s > curpts_s + 1)
+ if (non_interleaved && subpts_s > curpts_s + 1)
break;
}
double duration = d_sub->first->duration;
@@ -1798,7 +1799,7 @@ static void update_subtitles(struct MPContext *mpctx, double refpts_tl)
sub_add_text(&mpctx->subs, packet, len, endpts_s);
set_osd_subtitle(mpctx, &mpctx->subs);
}
- if (d_sub->non_interleaved)
+ if (non_interleaved)
ds_get_next_pts(d_sub);
}
if (!opts->ass_enabled)
@@ -3589,6 +3590,8 @@ static void open_external_file(struct MPContext *mpctx, char *filename,
if (stream->type == filter) {
struct track *t = add_stream_track(mpctx, stream, false);
t->is_external = true;
+ t->title = talloc_strdup(t, filename);
+ num_added++;
}
}
if (num_added == 0) {