diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/decode/dec_video.c | 14 | ||||
-rw-r--r-- | video/decode/dec_video.h | 2 | ||||
-rw-r--r-- | video/decode/vd.h | 2 | ||||
-rw-r--r-- | video/decode/vd_lavc.c | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c index 1fc156271b..497ae56a02 100644 --- a/video/decode/dec_video.c +++ b/video/decode/dec_video.c @@ -56,6 +56,13 @@ const vd_functions_t * const mpcodecs_vd_drivers[] = { NULL }; +void video_reset_decoding(struct dec_video *d_video) +{ + video_vd_control(d_video, VDCTRL_RESET, NULL); + d_video->prev_codec_reordered_pts = MP_NOPTS_VALUE; + d_video->prev_sorted_pts = MP_NOPTS_VALUE; +} + int video_vd_control(struct dec_video *d_video, int cmd, void *arg) { const struct vd_functions *vd = d_video->vd_driver; @@ -101,13 +108,6 @@ int video_get_colors(struct dec_video *d_video, const char *item, int *value) return 0; } -void video_resync_stream(struct dec_video *d_video) -{ - video_vd_control(d_video, VDCTRL_RESYNC_STREAM, NULL); - d_video->prev_codec_reordered_pts = MP_NOPTS_VALUE; - d_video->prev_sorted_pts = MP_NOPTS_VALUE; -} - void video_reinit_vo(struct dec_video *d_video) { video_vd_control(d_video, VDCTRL_REINIT_VO, NULL); diff --git a/video/decode/dec_video.h b/video/decode/dec_video.h index a9c64cb695..cb4724af33 100644 --- a/video/decode/dec_video.h +++ b/video/decode/dec_video.h @@ -77,7 +77,7 @@ struct mp_image *video_decode(struct dec_video *d_video, int video_get_colors(struct dec_video *d_video, const char *item, int *value); int video_set_colors(struct dec_video *d_video, const char *item, int value); -void video_resync_stream(struct dec_video *d_video); +void video_reset_decoding(struct dec_video *d_video); void video_reinit_vo(struct dec_video *d_video); int video_vd_control(struct dec_video *d_video, int cmd, void *arg); diff --git a/video/decode/vd.h b/video/decode/vd.h index 045914f502..bf3a8e4374 100644 --- a/video/decode/vd.h +++ b/video/decode/vd.h @@ -43,7 +43,7 @@ extern const vd_functions_t *const mpcodecs_vd_drivers[]; enum vd_ctrl { VDCTRL_GET_PARAMS = 1, // retrieve struct mp_image_params - VDCTRL_RESYNC_STREAM, // reset decode state after seeking + VDCTRL_RESET, // reset decode state after seeking VDCTRL_QUERY_UNSEEN_FRAMES, // current decoder lag VDCTRL_REINIT_VO, // reinit filter/VO chain }; diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index c13ef68aad..d29bad6d29 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -821,7 +821,7 @@ static int control(struct dec_video *vd, int cmd, void *arg) vd_ffmpeg_ctx *ctx = vd->priv; AVCodecContext *avctx = ctx->avctx; switch (cmd) { - case VDCTRL_RESYNC_STREAM: + case VDCTRL_RESET: avcodec_flush_buffers(avctx); return CONTROL_TRUE; case VDCTRL_QUERY_UNSEEN_FRAMES:; |