summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--player/video.c15
-rw-r--r--video/decode/dec_video.h5
2 files changed, 10 insertions, 10 deletions
diff --git a/player/video.c b/player/video.c
index 8b766eac47..21629b8990 100644
--- a/player/video.c
+++ b/player/video.c
@@ -280,11 +280,7 @@ void uninit_video_out(struct MPContext *mpctx)
static void vo_chain_uninit(struct vo_chain *vo_c)
{
mp_image_unrefp(&vo_c->input_mpi);
- if (vo_c) {
- vf_destroy(vo_c->vf);
- if (vo_c->video_src)
- video_uninit(vo_c->video_src);
- }
+ vf_destroy(vo_c->vf);
talloc_free(vo_c);
// this does not free the VO
}
@@ -292,7 +288,16 @@ static void vo_chain_uninit(struct vo_chain *vo_c)
void uninit_video_chain(struct MPContext *mpctx)
{
if (mpctx->vo_chain) {
+ struct track *track = mpctx->current_track[0][STREAM_VIDEO];
+ assert(track);
+ assert(track->d_video == mpctx->vo_chain->video_src);
+
reset_video_state(mpctx);
+
+ video_uninit(track->d_video);
+ track->d_video = NULL;
+ mpctx->vo_chain->video_src = NULL;
+
vo_chain_uninit(mpctx->vo_chain);
mpctx->vo_chain = NULL;
mpctx->video_status = STATUS_EOF;
diff --git a/video/decode/dec_video.h b/video/decode/dec_video.h
index 3aba448219..012f42c510 100644
--- a/video/decode/dec_video.h
+++ b/video/decode/dec_video.h
@@ -94,11 +94,6 @@ void video_set_start(struct dec_video *d_video, double start_pts);
#define VIDEO_SKIP -2
int video_get_frame(struct dec_video *d_video, struct mp_image **out_mpi);
-struct demux_packet;
-struct mp_image *video_decode(struct dec_video *d_video,
- struct demux_packet *packet,
- int drop_frame);
-
int video_vd_control(struct dec_video *d_video, int cmd, void *arg);
void video_reset(struct dec_video *d_video);
void video_reset_aspect(struct dec_video *d_video);