diff options
author | sfan5 <sfan5@live.de> | 2023-01-10 18:59:21 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-01-12 22:02:07 +0100 |
commit | 7b03cd367dd5416a4728ccea7e47dcd2827cbab7 (patch) | |
tree | cea4075b81850000890f55d6cd01de117a2138a0 /video/out/vo_lavc.c | |
parent | b6b83805183618f3a46f2cc77d85dcff72ef6396 (diff) | |
download | mpv-7b03cd367dd5416a4728ccea7e47dcd2827cbab7.tar.bz2 mpv-7b03cd367dd5416a4728ccea7e47dcd2827cbab7.tar.xz |
various: replace if + abort() with MP_HANDLE_OOM()
MP_HANDLE_OOM also aborts but calls assert() first, which
will result in an useful message if compiled in debug mode.
Diffstat (limited to 'video/out/vo_lavc.c')
-rw-r--r-- | video/out/vo_lavc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/video/out/vo_lavc.c b/video/out/vo_lavc.c index e817b530e0..8e188b5aab 100644 --- a/video/out/vo_lavc.c +++ b/video/out/vo_lavc.c @@ -217,8 +217,7 @@ static void draw_frame(struct vo *vo, struct vo_frame *voframe) pthread_mutex_unlock(&ectx->lock); AVFrame *frame = mp_image_to_av_frame(mpi); - if (!frame) - abort(); + MP_HANDLE_OOM(frame); frame->pts = rint(outpts * av_q2d(av_inv_q(avc->time_base))); frame->pict_type = 0; // keep this at unknown/undefined |