mirror of
https://github.com/mpv-player/mpv
synced 2025-02-20 14:56:55 +00:00
demux_packet: add source stream index
Might be helpful later.
This commit is contained in:
parent
5957f828b0
commit
fde0e9e84d
@ -134,6 +134,7 @@ static struct demux_packet *create_packet(size_t len)
|
|||||||
.duration = -1,
|
.duration = -1,
|
||||||
.stream_pts = MP_NOPTS_VALUE,
|
.stream_pts = MP_NOPTS_VALUE,
|
||||||
.pos = -1,
|
.pos = -1,
|
||||||
|
.stream = -1,
|
||||||
};
|
};
|
||||||
return dp;
|
return dp;
|
||||||
}
|
}
|
||||||
@ -322,6 +323,9 @@ int demuxer_add_packet(demuxer_t *demuxer, struct sh_stream *stream,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dp->stream = stream->index;
|
||||||
|
dp->next = NULL;
|
||||||
|
|
||||||
ds->packs++;
|
ds->packs++;
|
||||||
ds->bytes += dp->len;
|
ds->bytes += dp->len;
|
||||||
if (ds->tail) {
|
if (ds->tail) {
|
||||||
|
@ -31,6 +31,7 @@ typedef struct demux_packet {
|
|||||||
int64_t pos; // position in source file byte stream
|
int64_t pos; // position in source file byte stream
|
||||||
unsigned char *buffer;
|
unsigned char *buffer;
|
||||||
bool keyframe;
|
bool keyframe;
|
||||||
|
int stream; // source stream index
|
||||||
struct demux_packet *next;
|
struct demux_packet *next;
|
||||||
void *allocation;
|
void *allocation;
|
||||||
struct AVPacket *avpacket; // original libavformat packet (demux_lavf)
|
struct AVPacket *avpacket; // original libavformat packet (demux_lavf)
|
||||||
|
Loading…
Reference in New Issue
Block a user