diff --git a/debian/changelog b/debian/changelog index f3af902..2109135 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +mpv (0.38.0-1deepin3) unstable; urgency=medium + + * chore: Update version to 0.38.0-1deepin3 + * fix: add vaapi null pointer crash patch to series + + -- zhanghongyuan Mon, 15 Dec 2025 09:54:24 +0800 + mpv (0.38.0-1deepin2) unstable; urgency=medium * chore: Update version to 0.38.0-1deepin2 diff --git a/debian/patches/fix-vaapi-nullpter-crush.patch b/debian/patches/fix-vaapi-nullpter-crush.patch new file mode 100644 index 0000000..a3d2264 --- /dev/null +++ b/debian/patches/fix-vaapi-nullpter-crush.patch @@ -0,0 +1,50 @@ +Index: mpv/video/out/vo_vaapi.c +=================================================================== +--- mpv.orig/video/out/vo_vaapi.c ++++ mpv/video/out/vo_vaapi.c +@@ -410,19 +410,11 @@ static void va_pool_set_allocator(struct + mp_image_pool_set_lru(pool); + } + +-static void flush_output_surfaces(struct priv *p) +-{ +- for (int n = 0; n < MAX_OUTPUT_SURFACES; n++) +- mp_image_unrefp(&p->output_surfaces[n]); +- p->output_surface = 0; +- p->visible_surface = 0; +-} +- + // See flush_surfaces() remarks - the same applies. + static void free_video_specific(struct priv *p) + { +- flush_output_surfaces(p); +- ++ p->output_surface = 0; ++ p->visible_surface = 0; + mp_image_unrefp(&p->black_surface); + + for (int n = 0; n < MAX_OUTPUT_SURFACES; n++) +@@ -434,7 +426,6 @@ static void free_video_specific(struct p + + static bool alloc_swdec_surfaces(struct priv *p, int w, int h, int imgfmt) + { +- free_video_specific(p); + for (int i = 0; i < MAX_OUTPUT_SURFACES; i++) { + p->swdec_surfaces[i] = mp_image_pool_get(p->pool, IMGFMT_VAAPI, w, h); + if (va_surface_alloc_imgfmt(p, p->swdec_surfaces[i], imgfmt) < 0) +@@ -581,14 +572,12 @@ static void draw_frame(struct vo *vo, st + struct mp_image *dst = p->swdec_surfaces[p->output_surface]; + if (!dst || va_surface_upload(p, dst, mpi) < 0) { + MP_WARN(vo, "Could not upload surface.\n"); +- talloc_free(mpi); + return; + } + mp_image_copy_attributes(dst, mpi); +- mpi = mp_image_new_ref(dst); ++ mpi = dst; + } + +- talloc_free(p->output_surfaces[p->output_surface]); + p->output_surfaces[p->output_surface] = mpi; + + draw_osd(vo); diff --git a/debian/patches/series b/debian/patches/series index 523dd97..701f694 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ pgv-flower-screen.patch vdpau-render.patch Fix-the-problem-of-the-full-screen-crash.patch fix-mpv.patch +fix-vaapi-nullpter-crush.patch