mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02:00
demux: remove some more minor unused things
This commit is contained in:
parent
9bb7935ce1
commit
32ad313844
@ -197,8 +197,6 @@ struct demux_packet *demux_copy_packet(struct demux_packet *dp)
|
||||
new->pts = dp->pts;
|
||||
new->duration = dp->duration;
|
||||
new->stream_pts = dp->stream_pts;
|
||||
new->pos = dp->pos;
|
||||
new->keyframe = dp->keyframe;
|
||||
return new;
|
||||
}
|
||||
|
||||
@ -243,11 +241,9 @@ static demuxer_t *new_demuxer(struct MPOpts *opts, stream_t *stream, int type,
|
||||
struct demuxer *d = talloc_zero(NULL, struct demuxer);
|
||||
d->stream = stream;
|
||||
d->stream_pts = MP_NOPTS_VALUE;
|
||||
d->reference_clock = MP_NOPTS_VALUE;
|
||||
d->movi_start = stream->start_pos;
|
||||
d->movi_end = stream->end_pos;
|
||||
d->seekable = 1;
|
||||
d->synced = 0;
|
||||
d->filepos = -1;
|
||||
d->audio = new_demuxer_stream(d, STREAM_AUDIO);
|
||||
d->video = new_demuxer_stream(d, STREAM_VIDEO);
|
||||
@ -475,9 +471,6 @@ int ds_fill_buffer(demux_stream_t *ds)
|
||||
ds->buffer = p->buffer;
|
||||
ds->buffer_pos = 0;
|
||||
ds->buffer_size = p->len;
|
||||
ds->pos = p->pos;
|
||||
ds->dpos += p->len; // !!!
|
||||
++ds->pack_no;
|
||||
if (p->pts != MP_NOPTS_VALUE) {
|
||||
ds->pts = p->pts;
|
||||
ds->pts_bytes = 0;
|
||||
@ -485,7 +478,6 @@ int ds_fill_buffer(demux_stream_t *ds)
|
||||
ds->pts_bytes += p->len; // !!!
|
||||
if (p->stream_pts != MP_NOPTS_VALUE)
|
||||
demux->stream_pts = p->stream_pts;
|
||||
ds->keyframe = p->keyframe;
|
||||
// unlink packet:
|
||||
ds->bytes -= p->len;
|
||||
ds->current = p;
|
||||
|
@ -96,10 +96,6 @@ typedef struct demux_stream {
|
||||
double pts; // current buffer's pts
|
||||
int pts_bytes; // number of bytes read after last pts stamp
|
||||
int eof; // end of demuxed stream? (true if all buffer empty)
|
||||
int64_t pos; // position in the input stream (file)
|
||||
int64_t dpos; // position in the demuxed stream
|
||||
int pack_no; // serial number of packet
|
||||
bool keyframe; // keyframe flag of current packet
|
||||
//---------------
|
||||
int fill_count; // number of unsuccessful tries to get a packet
|
||||
int packs; // number of packets in buffer
|
||||
@ -189,9 +185,7 @@ typedef struct demuxer {
|
||||
int64_t movi_end;
|
||||
struct stream *stream;
|
||||
double stream_pts; // current stream pts, if applicable (e.g. dvd)
|
||||
double reference_clock;
|
||||
char *filename; // Needed by avs_check_file
|
||||
int synced; // stream synced (used by mpeg)
|
||||
enum demuxer_type type;
|
||||
/* Normally the file_format field is just a copy of the type field above.
|
||||
* There are 2 exceptions I noticed. Internal demux_avi may force
|
||||
|
@ -346,7 +346,6 @@ static int demux_mng_fill_buffer(demuxer_t * demuxer,
|
||||
// Set position and timing information in demuxer video and demuxer packet.
|
||||
// - Time must be time of next frame and always be > 0 for the variable
|
||||
// frame time mechanism (GIF, MATROSKA, MNG) in video.c to work.
|
||||
demuxer->video->dpos++;
|
||||
dp->pts = (float)mng_priv->show_next_time_ms / 1000.0f + MNG_START_PTS;
|
||||
dp->pos = stream_tell(demuxer->stream);
|
||||
ds_add_packet(demuxer->video, dp);
|
||||
|
@ -116,7 +116,6 @@ typedef struct sh_audio {
|
||||
|
||||
typedef struct sh_video {
|
||||
SH_COMMON
|
||||
double i_pts; // PTS for the _next_ I/P frame (internal mpeg demuxing)
|
||||
float next_frame_time;
|
||||
double last_pts;
|
||||
double buffered_pts[32];
|
||||
|
Loading…
Reference in New Issue
Block a user