Quoting Soft Works (2021-11-26 19:43:58) > Maybe I'm missing something, but hw device contexts are refcounted. > What happens in hwdevice_ctx_free() is this: > > av_buffer_unref(&ctx->internal->source_device);
IIUC this only happens after the parent device is freed. My concern is the following situation: - the caller creates a parent hwdevice - the caller derives a child from it, which may acquire some additional resources beyond what the parent holds - the caller unrefs all his references to the child, but the child does not get freed because the parent still holds a reference to it Since av_hwdevice_ctx_create_derived() has a flags parameter, we might want to introduce a flag to control this behavior. -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".