summaryrefslogtreecommitdiffstats
path: root/demux/demux.c
diff options
context:
space:
mode:
Diffstat (limited to 'demux/demux.c')
-rw-r--r--demux/demux.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/demux/demux.c b/demux/demux.c
index d9cf3b37dd..983a96c90a 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -133,6 +133,7 @@ static struct demux_packet *create_packet(size_t len)
.pts = MP_NOPTS_VALUE,
.duration = -1,
.stream_pts = MP_NOPTS_VALUE,
+ .pos = -1,
};
return dp;
}
@@ -339,6 +340,9 @@ int demuxer_add_packet(demuxer_t *demuxer, struct sh_stream *stream,
* appear. */
ds->eof = 0;
+ if (dp->pos >= 0)
+ demuxer->filepos = dp->pos;
+
mp_dbg(MSGT_DEMUXER, MSGL_DBG2,
"DEMUX: Append packet to %s, len=%d pts=%5.3f pos=%"PRIu64" "
"[packs: A=%d V=%d S=%d]\n", stream_type_name(stream->type),