1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-11 08:37:59 +00:00
mpv/video/filter
wm4 72aac9ae8a video: introduce failure path for image allocations
Until now, failure to allocate image data resulted in a crash (i.e.
abort() was called). This was intentional, because it's pretty silly to
degrade playback, and in almost all situations, the OOM will probably
kill you anyway. (And then there's the standard Linux overcommit
behavior, which also will kill you at some point.)

But I changed my opinion, so here we go. This change does not affect
_all_ memory allocations, just image data. Now in most failure cases,
the output will just be skipped. For video filters, this coincidentally
means that failure is treated as EOF (because the playback core assumes
EOF if nothing comes out of the video filter chain). In other
situations, output might be in some way degraded, like skipping frames,
not scaling OSD, and such.

Functions whose return values changed semantics:

  mp_image_alloc
  mp_image_new_copy
  mp_image_new_ref
  mp_image_make_writeable
  mp_image_setrefp
  mp_image_to_av_frame_and_unref
  mp_image_from_av_frame
  mp_image_new_external_ref
  mp_image_new_custom_ref
  mp_image_pool_make_writeable
  mp_image_pool_get
  mp_image_pool_new_copy
  mp_vdpau_mixed_frame_create
  vf_alloc_out_image
  vf_make_out_image_writeable
  glGetWindowScreenshot
2014-06-17 22:43:43 +02:00
..
pullup.c vf_pullup: remove inline asm 2014-04-19 17:10:20 +02:00
pullup.h vf_pullup: remove inline asm 2014-04-19 17:10:20 +02:00
vf_crop.c Kill all tabs 2014-04-13 18:03:01 +02:00
vf_delogo.c vf_delogo: remove internal implementation 2014-03-16 13:19:29 +01:00
vf_divtc.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_dlopen.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_dlopen.h vf_dlopen: remove buggy private name -> imgfmt conversion 2014-05-15 10:32:16 -07:00
vf_dsize.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
vf_eq.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_expand.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_flip.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
vf_format.c Kill all tabs 2014-04-13 18:03:01 +02:00
vf_gradfun.c vf_gradfun: remove internal implementation 2014-03-16 13:19:29 +01:00
vf_hqdn3d.c vf_hqdn3d: remove internal implementation 2014-03-16 13:19:29 +01:00
vf_ilpack.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_lavfi.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_lavfi.h build: simplify libavfilter configure checks 2014-03-16 13:19:29 +01:00
vf_mirror.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_noformat.c Kill all tabs 2014-04-13 18:03:01 +02:00
vf_noise.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_phase.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_pp.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_pullup.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_rotate.c Add more const 2014-06-11 00:39:14 +02:00
vf_scale.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_screenshot.c video/filter: make vf->control non-recursive 2013-12-07 19:33:38 +01:00
vf_softpulldown.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_stereo3d.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_sub.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_swapuv.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
vf_unsharp.c vf_unsharp: remove internal implementation 2014-03-16 13:19:29 +01:00
vf_vapoursynth.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_vavpp.c video: don't drop last frame when deinterlacing with yadif 2014-04-28 22:23:31 +02:00
vf_vdpaupp.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_yadif.c vf_yadif: remove internal implementation 2014-03-16 13:19:29 +01:00
vf.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf.h video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00