mirror of
https://github.com/mpv-player/mpv
synced 2025-01-09 08:29:36 +00:00
ad_lavc: check for allocation failure
Fixes: https://github.com/mpv-player/mpv/issues/11792
This commit is contained in:
parent
0af81b16d8
commit
32147956ca
@ -105,6 +105,7 @@ static bool init(struct mp_filter *da, struct mp_codec_params *codec,
|
||||
ctx->avctx = lavc_context;
|
||||
ctx->avframe = av_frame_alloc();
|
||||
ctx->avpkt = av_packet_alloc();
|
||||
MP_HANDLE_OOM(ctx->avctx && ctx->avframe && ctx->avpkt);
|
||||
lavc_context->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||
lavc_context->codec_id = lavc_codec->id;
|
||||
lavc_context->pkt_timebase = ctx->codec_timebase;
|
||||
|
Loading…
Reference in New Issue
Block a user