mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 00:02:13 +00:00
demux: remove some unused sh_video_t fields
Completely mysterious, and its values were never actually used.
This commit is contained in:
parent
c12b5ffc33
commit
15ff7a5719
@ -2455,7 +2455,6 @@ static double update_video_nocorrect_pts(struct MPContext *mpctx)
|
||||
&packet, mpctx->opts.force_fps);
|
||||
if (in_size < 0)
|
||||
return -1;
|
||||
sh_video->timer += frame_time;
|
||||
if (mpctx->sh_audio)
|
||||
mpctx->delay -= frame_time;
|
||||
// video_read_frame can change fps (e.g. for ASF video)
|
||||
@ -2588,7 +2587,6 @@ static double update_video(struct MPContext *mpctx)
|
||||
}
|
||||
double frame_time = sh_video->pts - sh_video->last_pts;
|
||||
sh_video->last_pts = sh_video->pts;
|
||||
sh_video->timer += frame_time;
|
||||
if (mpctx->sh_audio)
|
||||
mpctx->delay -= frame_time;
|
||||
return frame_time;
|
||||
@ -2665,11 +2663,9 @@ static void seek_reset(struct MPContext *mpctx, bool reset_ao, bool reset_ac)
|
||||
{
|
||||
if (mpctx->sh_video) {
|
||||
resync_video_stream(mpctx->sh_video);
|
||||
mpctx->sh_video->timer = 0;
|
||||
vo_seek_reset(mpctx->video_out);
|
||||
if (mpctx->sh_video->vf_initialized == 1)
|
||||
vf_chain_seek_reset(mpctx->sh_video->vfilter);
|
||||
mpctx->sh_video->timer = 0;
|
||||
mpctx->sh_video->num_buffered_pts = 0;
|
||||
mpctx->sh_video->last_pts = MP_NOPTS_VALUE;
|
||||
mpctx->delay = 0;
|
||||
@ -4047,7 +4043,6 @@ goto_enable_cache: ;
|
||||
//================ SETUP STREAMS ==========================
|
||||
|
||||
if (mpctx->sh_video) {
|
||||
mpctx->sh_video->timer = 0;
|
||||
if (!opts->ignore_start)
|
||||
mpctx->audio_delay += mpctx->sh_video->stream_delay;
|
||||
}
|
||||
|
@ -652,8 +652,7 @@ static void demux_seek_avi(demuxer_t *demuxer, float rel_seek_secs,
|
||||
int id=((AVIINDEXENTRY *)priv->idx)[i].ckid;
|
||||
if(avi_stream_id(id)==d_video->id) ++d_video->pack_no;
|
||||
}
|
||||
priv->video_pack_no=
|
||||
sh_video->num_frames=sh_video->num_frames_decoded=d_video->pack_no;
|
||||
priv->video_pack_no=d_video->pack_no;
|
||||
priv->avi_video_pts=d_video->pack_no*(float)sh_video->video.dwScale/(float)sh_video->video.dwRate;
|
||||
d_video->pos=video_chunk_pos;
|
||||
|
||||
|
@ -127,10 +127,6 @@ typedef struct sh_audio {
|
||||
|
||||
typedef struct sh_video {
|
||||
SH_COMMON
|
||||
float timer; // absolute time in video stream, since last start/seek
|
||||
// frame counters:
|
||||
float num_frames; // number of frames played
|
||||
int num_frames_decoded; // number of frames decoded
|
||||
double i_pts; // PTS for the _next_ I/P frame (internal mpeg demuxing)
|
||||
float next_frame_time;
|
||||
double last_pts;
|
||||
|
@ -560,10 +560,6 @@ int video_read_frame(sh_video_t* sh_video,float* frame_time_ptr,unsigned char**
|
||||
|
||||
//------------------------ frame decoded. --------------------
|
||||
|
||||
// Increase video timers:
|
||||
sh_video->num_frames+=frame_time;
|
||||
++sh_video->num_frames_decoded;
|
||||
|
||||
frame_time*=sh_video->frametime;
|
||||
|
||||
// override frame_time for variable/unknown FPS formats:
|
||||
|
Loading…
Reference in New Issue
Block a user