summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/decode/vd_lavc.c1
-rw-r--r--video/out/vo.c5
-rw-r--r--video/out/vo.h1
3 files changed, 6 insertions, 1 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 86c1c92541..6f395ea843 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -778,7 +778,6 @@ static struct mp_image *decode_with_fallback(struct sh_video *sh,
// Failed hardware decoding? Try again in software.
if (ctx->software_fallback_decoder) {
uninit_avctx(sh);
- sh->vf_initialized = 0;
mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, "Error using hardware "
"decoding, falling back to software decoding.\n");
const char *decoder = ctx->software_fallback_decoder;
diff --git a/video/out/vo.c b/video/out/vo.c
index a069c442df..0dc60a558d 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -406,6 +406,9 @@ int vo_reconfig(struct vo *vo, struct mp_image_params *params, int flags)
vo->dwidth = d_width;
vo->dheight = d_height;
+ talloc_free(vo->params);
+ vo->params = NULL;
+
struct mp_image_params p2 = *params;
int ret;
@@ -419,6 +422,8 @@ int vo_reconfig(struct vo *vo, struct mp_image_params *params, int flags)
}
vo->config_ok = (ret >= 0);
vo->config_count += vo->config_ok;
+ if (vo->config_ok)
+ vo->params = talloc_memdup(vo, &p2, sizeof(p2));
if (vo->registered_fd == -1 && vo->event_fd != -1 && vo->config_ok) {
mp_input_add_key_fd(vo->input_ctx, vo->event_fd, 1, event_fd_callback,
NULL, vo);
diff --git a/video/out/vo.h b/video/out/vo.h
index 50e83d2809..3b6adddb0c 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -238,6 +238,7 @@ struct vo {
struct mp_log *log; // Using e.g. "[vo/vdpau]" as prefix
int config_ok; // Last config call was successful?
int config_count; // Total number of successful config calls
+ struct mp_image_params *params; // Configured parameters (as in vo_reconfig)
bool probing;