mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
avcodec/nvenc: make sure newly allocated packets are refcounted
Fixes ticket 8383 Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
This commit is contained in:
parent
4fbeaaa220
commit
4df5dfabcc
@ -1856,7 +1856,11 @@ static int process_output_surface(AVCodecContext *avctx, AVPacket *pkt, NvencSur
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res = ff_alloc_packet2(avctx, pkt, lock_params.bitstreamSizeInBytes,0)) {
|
res = pkt->data ?
|
||||||
|
ff_alloc_packet2(avctx, pkt, lock_params.bitstreamSizeInBytes, lock_params.bitstreamSizeInBytes) :
|
||||||
|
av_new_packet(pkt, lock_params.bitstreamSizeInBytes);
|
||||||
|
|
||||||
|
if (res < 0) {
|
||||||
p_nvenc->nvEncUnlockBitstream(ctx->nvencoder, tmpoutsurf->output_surface);
|
p_nvenc->nvEncUnlockBitstream(ctx->nvencoder, tmpoutsurf->output_surface);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user