mirror of
https://github.com/mpv-player/mpv
synced 2024-11-03 03:19:24 +01:00
72aac9ae8a
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 |
||
---|---|---|
.. | ||
decode | ||
filter | ||
out | ||
csputils.c | ||
csputils.h | ||
fmt-conversion.c | ||
fmt-conversion.h | ||
hwdec.h | ||
image_writer.c | ||
image_writer.h | ||
img_format.c | ||
img_format.h | ||
img_fourcc.h | ||
memcpy_pic.h | ||
mp_image_pool.c | ||
mp_image_pool.h | ||
mp_image.c | ||
mp_image.h | ||
sws_utils.c | ||
sws_utils.h | ||
vaapi.c | ||
vaapi.h | ||
vdpau_functions.inc | ||
vdpau_mixer.c | ||
vdpau_mixer.h | ||
vdpau.c | ||
vdpau.h | ||
vfcap.h |