[FFmpeg-devel] [PATCH] lavc/nvenc: enable nvenc encoder instance reuse (v2)

Timo Rothenpieler timo at rothenpieler.org
Wed Jun 13 18:03:03 EEST 2018


>>
>> -    if (ctx->encoder_flushing)
>> -        return AVERROR_EOF;
>> +    if (ctx->encoder_flushing) {
>> +        if (avctx->internal->draining)
>> +            return AVERROR_EOF;
>> +
>> +        ctx->encoder_flushing = 0;
>> +        ctx->first_packet_output = 0;
>> +        ctx->initial_pts[0] = AV_NOPTS_VALUE;
>> +        ctx->initial_pts[1] = AV_NOPTS_VALUE;
>> +        av_fifo_reset(ctx->timestamp_list);
>> +    }
>>
>>       if (frame) {
>>           in_surf = get_free_frame(ctx);
>> --
>> 2.16.4
>>
> 
> 
> Can this be applied?

I'm not opposing it, and will in fact apply it if nobody objects.

Still not sure if the API is intended to be used like that, but I can't 
think of anything it might break to offer this functionality.

A second opinion on this would be nice, otherwise I'll apply it with my 
next set of patches in a few days.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3994 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180613/0d46c527/attachment.bin>


More information about the ffmpeg-devel mailing list