summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-15 21:27:38 +0200
committerwm4 <wm4@nowhere>2013-04-20 23:28:27 +0200
commit15ff7a57198beb675e379b0453561e5bc90e8859 (patch)
tree3717ec8b72aa3d6938c489355b387255b07dfaa0
parentc12b5ffc33f8fb424b821afef1e060d7f6275844 (diff)
downloadmpv-15ff7a57198beb675e379b0453561e5bc90e8859.tar.bz2
mpv-15ff7a57198beb675e379b0453561e5bc90e8859.tar.xz
demux: remove some unused sh_video_t fields
Completely mysterious, and its values were never actually used.
-rw-r--r--core/mplayer.c5
-rw-r--r--demux/demux_avi.c3
-rw-r--r--demux/stheader.h4
-rw-r--r--demux/video.c4
4 files changed, 1 insertions, 15 deletions
diff --git a/core/mplayer.c b/core/mplayer.c
index 2df036307b..a7fe7618df 100644
--- a/core/mplayer.c
+++ b/core/mplayer.c
@@ -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;
}
diff --git a/demux/demux_avi.c b/demux/demux_avi.c
index fbce13f707..daf542bfac 100644
--- a/demux/demux_avi.c
+++ b/demux/demux_avi.c
@@ -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;
diff --git a/demux/stheader.h b/demux/stheader.h
index 7cb65b9bcc..af4ceaff16 100644
--- a/demux/stheader.h
+++ b/demux/stheader.h
@@ -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;
diff --git a/demux/video.c b/demux/video.c
index d565687d8b..69749e03d1 100644
--- a/demux/video.c
+++ b/demux/video.c
@@ -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: