From 7c3f1ffc44b532590e661315b42fea5b6d1ae40c Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 22 Sep 2013 22:47:15 +0200 Subject: vd_lavc: allow process_image to change image format This will allow GPU read-back with process_image. We have to restructure how init_vo() works. Instead of initializing the VO before process_image is called, rename init_vo() to update_image_params(), and let it update the params only. Then we really initialize the VO after process_image. As a consequence of these changes, already decoded hw frames are correctly unreferenced if creation of the filter chain fails. This could trigger assertions on VO uninitialization, because it's not allowed to reference hw frames past VO lifetime. --- video/decode/lavc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/decode/lavc.h') diff --git a/video/decode/lavc.h b/video/decode/lavc.h index 769d20b0df..681f151ad0 100644 --- a/video/decode/lavc.h +++ b/video/decode/lavc.h @@ -26,9 +26,9 @@ typedef struct lavc_ctx { struct vd_lavc_hwdec *hwdec; enum PixelFormat pix_fmt; int do_hw_dr1; - int vo_initialized; int best_csp; struct mp_image_params image_params; + struct mp_image_params vo_image_params; AVRational last_sample_aspect_ratio; enum AVDiscard skip_frame; const char *software_fallback_decoder; -- cgit v1.2.3