summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_lavc.c
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2023-01-10 18:59:21 +0100
committersfan5 <sfan5@live.de>2023-01-12 22:02:07 +0100
commit7b03cd367dd5416a4728ccea7e47dcd2827cbab7 (patch)
treecea4075b81850000890f55d6cd01de117a2138a0 /audio/out/ao_lavc.c
parentb6b83805183618f3a46f2cc77d85dcff72ef6396 (diff)
downloadmpv-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 'audio/out/ao_lavc.c')
-rw-r--r--audio/out/ao_lavc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/audio/out/ao_lavc.c b/audio/out/ao_lavc.c
index cb53407eb6..abeefeed27 100644
--- a/audio/out/ao_lavc.c
+++ b/audio/out/ao_lavc.c
@@ -210,8 +210,7 @@ static void encode(struct ao *ao, struct mp_aframe *af)
double outpts = mp_aframe_get_pts(af);
AVFrame *frame = mp_aframe_to_avframe(af);
- if (!frame)
- abort();
+ MP_HANDLE_OOM(frame);
frame->pts = rint(outpts * av_q2d(av_inv_q(encoder->time_base)));